Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upgrade: Separate add card and purchase upgrade flow.

Aman Agrawal09009ab03a51
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index f0804378b4e..ebf07066403 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -595,33 +595,72 @@ class BillingSession(ABC):
def create_stripe_payment_intent(
self, price_per_license: int, licenses: int, metadata: Dict[str, Any]
- ) -> PaymentIntent:
+ ) -> str:
+ # NOTE: This charges users immediately.
customer = self.get_customer()
assert customer is not None and customer.stripe_customer_id is not None
payment_intent_data = self.get_data_for_stripe_payment_intent(price_per_license, licenses)
- stripe_payment_intent = stripe.PaymentIntent.create(
- amount=payment_intent_data.amount,
- currency="usd",
+ # Ensure customers have a default payment method set.
+ stripe_customer = stripe_get_customer(customer.stripe_customer_id)
+ if not stripe_customer_has_credit_card_as_default_payment_method(stripe_customer):
+ raise BillingError(
+ "no payment method",
+ "Please add a credit card before upgrading.",
+ )
+
+ assert stripe_customer.invoice_settings is not None
+ assert stripe_customer.invoice_settings.default_payment_method is not None
+ try:
+ # Try to charge user immediately, and if that fails, we inform the user about the failure.
+ stripe_payment_intent = stripe.PaymentIntent.create(
+ amount=payment_intent_data.amount,
+ currency="usd",
+ customer=customer.stripe_customer_id,
+ description=payment_intent_data.description,
+ receipt_email=payment_intent_data.email,
+ confirm=True,
+ statement_descriptor=payment_intent_data.plan_name,
+ metadata=metadata,
+ off_session=True,
+ payment_method=stripe_customer.invoice_settings.default_payment_method,
+ )
+ except stripe.error.CardError as e:
+ raise StripeCardError("card error", e.user_message)
+
+ PaymentIntent.objects.create(
+ customer=customer,
+ stripe_payment_intent_id=stripe_payment_intent.id,
+ status=PaymentIntent.get_status_integer_from_status_text(stripe_payment_intent.status),
+ )
+ return stripe_payment_intent.id
+
+ def create_stripe_update_card_for_realm_upgrade_session(
+ self,
+ metadata: Dict[str, Any],
+ session_type: int,
+ ) -> stripe.checkout.Session:
+ customer = self.update_or_create_stripe_customer()
+ stripe_session = stripe.checkout.Session.create(
+ cancel_url=f"{self.billing_session_url}/upgrade/",
customer=customer.stripe_customer_id,
- description=payment_intent_data.description,
- receipt_email=payment_intent_data.email,
- confirm=False,
- statement_descriptor=payment_intent_data.plan_name,
metadata=metadata,
+ mode="setup",
+ payment_method_types=["card"],
+ success_url=f"{self.billing_session_url}/billing/event_status?stripe_session_id={{CHECKOUT_SESSION_ID}}",
)
- payment_intent = PaymentIntent.objects.create(
+ Session.objects.create(
+ stripe_session_id=stripe_session.id,
customer=customer,
- stripe_payment_intent_id=stripe_payment_intent.id,
- status=PaymentIntent.get_status_integer_from_status_text(stripe_payment_intent.status),
+ type=session_type,
)
- return payment_intent
+ return stripe_session
def create_stripe_checkout_session(
self,
metadata: Dict[str, Any],
session_type: int,
- payment_intent: Optional[PaymentIntent] = None,
) -> stripe.checkout.Session:
+ # Create checkout sessions for adding and updating exiting cards.
customer = self.get_customer()
assert customer is not None and customer.stripe_customer_id is not None
stripe_session = stripe.checkout.Session.create(
@@ -632,15 +671,11 @@ class BillingSession(ABC):
payment_method_types=["card"],
success_url=f"{self.billing_session_url}/billing/event_status?stripe_session_id={{CHECKOUT_SESSION_ID}}",
)
- session = Session.objects.create(
+ Session.objects.create(
stripe_session_id=stripe_session.id,
customer=customer,
type=session_type,
)
- if payment_intent is not None:
- session.payment_intent = payment_intent
- session.save(update_fields=["payment_intent"])
- session.save()
return stripe_session
def attach_discount_to_customer(self, discount: Decimal) -> None:
@@ -690,7 +725,7 @@ class BillingSession(ABC):
extra_data={"charge_automatically": charge_automatically},
)
- def setup_upgrade_checkout_session_and_payment_intent(
+ def setup_upgrade_payment_intent_and_charge(
self,
plan_tier: int,
seat_count: int,
@@ -698,11 +733,9 @@ class BillingSession(ABC):
license_management: str,
billing_schedule: int,
billing_modality: str,
- onboarding: bool,
- ) -> stripe.checkout.Session:
+ ) -> str:
customer = self.update_or_create_stripe_customer()
assert customer is not None # for mypy
- free_trial = is_free_trial_offer_enabled()
price_per_license = get_price_per_license(
plan_tier, billing_schedule, customer.default_discount
)
@@ -718,21 +751,10 @@ class BillingSession(ABC):
updated_metadata = self.update_data_for_checkout_session_and_payment_intent(
general_metadata
)
- if free_trial:
- if onboarding:
- session_type = Session.FREE_TRIAL_UPGRADE_FROM_ONBOARDING_PAGE
- else:
- session_type = Session.FREE_TRIAL_UPGRADE_FROM_BILLING_PAGE
- payment_intent = None
- else:
- session_type = Session.UPGRADE_FROM_BILLING_PAGE
- payment_intent = self.create_stripe_payment_intent(
- price_per_license, licenses, updated_metadata
- )
- stripe_session = self.create_stripe_checkout_session(
- updated_metadata, session_type, payment_intent
+ stripe_payment_intent_id = self.create_stripe_payment_intent(
+ price_per_license, licenses, updated_metadata
)
- return stripe_session
+ return stripe_payment_intent_id
# Only used for cloud signups
@catch_stripe_errors
@@ -782,6 +804,18 @@ class BillingSession(ABC):
}
if free_trial:
plan_params["status"] = CustomerPlan.FREE_TRIAL
+
+ if charge_automatically:
+ # Ensure free trial customers not paying via invoice have a default payment method set
+ stripe_customer = stripe_get_customer(customer.stripe_customer_id)
+ if not stripe_customer_has_credit_card_as_default_payment_method(
+ stripe_customer
+ ):
+ raise BillingError(
+ "no payment method",
+ _("Please add a credit card before starting your free trial."),
+ )
+
plan = CustomerPlan.objects.create(
customer=customer, next_invoice_date=next_invoice_date, **plan_params
)
@@ -867,29 +901,28 @@ class BillingSession(ABC):
schedule
]
data: Dict[str, Any] = {}
- if charge_automatically:
- stripe_checkout_session = self.setup_upgrade_checkout_session_and_payment_intent(
+ free_trial = is_free_trial_offer_enabled()
+ # Directly upgrade free trial orgs or invoice payment orgs to standard plan.
+ if free_trial or not charge_automatically:
+ self.process_initial_upgrade(
CustomerPlan.STANDARD,
- seat_count,
licenses,
- license_management,
+ automanage_licenses,
billing_schedule,
- billing_modality,
- upgrade_request.onboarding,
+ charge_automatically,
+ is_free_trial_offer_enabled(),
)
- data = {
- "stripe_session_url": stripe_checkout_session.url,
- "stripe_session_id": stripe_checkout_session.id,
- }
+ data["organization_upgrade_successful"] = True
else:
- self.process_initial_upgrade(
+ stripe_payment_intent_id = self.setup_upgrade_payment_intent_and_charge(
CustomerPlan.STANDARD,
+ seat_count,
licenses,
- automanage_licenses,
+ license_management,
billing_schedule,
- False,
- is_free_trial_offer_enabled(),
+ billing_modality,
)
+ data["stripe_payment_intent_id"] = stripe_payment_intent_id
return data
# event_time should roughly be timezone_now(). Not designed to handle
@@ -1150,6 +1183,16 @@ class BillingSession(ABC):
},
"manual_license_management": initial_upgrade_request.manual_license_management,
}
+
+ # Check if user was successful in adding a card and we are rendering the page again.
+ if customer is not None and customer_has_credit_card_as_default_payment_method(customer):
+ assert customer.stripe_customer_id is not None
+ stripe_customer = stripe_get_customer(customer.stripe_customer_id)
+ payment_method = payment_method_string(stripe_customer)
+ if "ending in" in payment_method:
+ # Show "Update card" button if user has already added a card.
+ context["payment_method"] = payment_method
+
self.update_context_initial_upgrade(context)
return None, context
diff --git a/corporate/lib/stripe_event_handler.py b/corporate/lib/stripe_event_handler.py
index 77c28ddd236..d59ce0cff05 100644
--- a/corporate/lib/stripe_event_handler.py
+++ b/corporate/lib/stripe_event_handler.py
@@ -1,5 +1,4 @@
import logging
-from contextlib import suppress
from typing import Any, Callable, Dict, Union
import stripe
@@ -81,36 +80,9 @@ def handle_checkout_session_completed_event(
assert isinstance(payment_method, (str, type(None)))
if session.type in [
- Session.UPGRADE_FROM_BILLING_PAGE,
- Session.RETRY_UPGRADE_WITH_ANOTHER_PAYMENT_METHOD,
+ Session.CARD_UPDATE_FROM_BILLING_PAGE,
+ Session.CARD_UPDATE_FROM_UPGRADE_PAGE,
]:
- ensure_customer_does_not_have_active_plan(session.customer)
- billing_session.update_or_create_stripe_customer(payment_method)
- assert session.payment_intent is not None
- session.payment_intent.status = PaymentIntent.PROCESSING
- session.payment_intent.last_payment_error = ()
- session.payment_intent.save(update_fields=["status", "last_payment_error"])
- with suppress(stripe.error.CardError):
- stripe.PaymentIntent.confirm(
- session.payment_intent.stripe_payment_intent_id,
- payment_method=payment_method,
- off_session=True,
- )
- elif session.type in [
- Session.FREE_TRIAL_UPGRADE_FROM_BILLING_PAGE,
- Session.FREE_TRIAL_UPGRADE_FROM_ONBOARDING_PAGE,
- ]:
- ensure_customer_does_not_have_active_plan(session.customer)
- billing_session.update_or_create_stripe_customer(payment_method)
- billing_session.process_initial_upgrade(
- CustomerPlan.STANDARD,
- int(stripe_session.metadata["licenses"]),
- stripe_session.metadata["license_management"] == "automatic",
- int(stripe_session.metadata["billing_schedule"]),
- charge_automatically=True,
- free_trial=True,
- )
- elif session.type in [Session.CARD_UPDATE_FROM_BILLING_PAGE]:
billing_session.update_or_create_stripe_customer(payment_method)
@@ -163,28 +135,3 @@ def handle_payment_intent_succeeded_event(
True,
False,
)
-
-
-@error_handler
-def handle_payment_intent_payment_failed_event(
- stripe_payment_intent: stripe.PaymentIntent, payment_intent: PaymentIntent
-) -> None:
- assert stripe_payment_intent.last_payment_error is not None
- payment_intent.status = PaymentIntent.get_status_integer_from_status_text(
- stripe_payment_intent.status
- )
- assert payment_intent.customer.realm is not None
- billing_logger.info(
- "Stripe payment intent failed: %s %s %s %s",
- payment_intent.customer.realm.string_id,
- stripe_payment_intent.last_payment_error.get("type"),
- stripe_payment_intent.last_payment_error.get("code"),
- stripe_payment_intent.last_payment_error.get("param"),
- )
- payment_intent.last_payment_error = {
- "description": stripe_payment_intent.last_payment_error.get("type"),
- }
- payment_intent.last_payment_error["message"] = stripe_payment_intent.last_payment_error.get(
- "message"
- )
- payment_intent.save(update_fields=["status", "last_payment_error"])
diff --git a/corporate/migrations/0021_remove_session_payment_intent.py b/corporate/migrations/0021_remove_session_payment_intent.py
new file mode 100644
index 00000000000..22c91c2b8f6
--- /dev/null
+++ b/corporate/migrations/0021_remove_session_payment_intent.py
@@ -0,0 +1,16 @@
+# Generated by Django 4.2.7 on 2023-11-18 14:54
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("corporate", "0020_add_remote_realm_customers"),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name="session",
+ name="payment_intent",
+ ),
+ ]
diff --git a/corporate/models.py b/corporate/models.py
index 7b292a396d1..50749aec9c5 100644
--- a/corporate/models.py
+++ b/corporate/models.py
@@ -106,13 +106,9 @@ def get_last_associated_event_by_type(
class Session(models.Model):
customer = models.ForeignKey(Customer, on_delete=CASCADE)
stripe_session_id = models.CharField(max_length=255, unique=True)
- payment_intent = models.ForeignKey("PaymentIntent", null=True, on_delete=CASCADE)
- UPGRADE_FROM_BILLING_PAGE = 1
- RETRY_UPGRADE_WITH_ANOTHER_PAYMENT_METHOD = 10
- FREE_TRIAL_UPGRADE_FROM_BILLING_PAGE = 20
- FREE_TRIAL_UPGRADE_FROM_ONBOARDING_PAGE = 30
CARD_UPDATE_FROM_BILLING_PAGE = 40
+ CARD_UPDATE_FROM_UPGRADE_PAGE = 50
type = models.SmallIntegerField()
CREATED = 1
@@ -124,11 +120,8 @@ class Session(models.Model):
def get_type_as_string(self) -> str:
return {
- Session.UPGRADE_FROM_BILLING_PAGE: "upgrade_from_billing_page",
- Session.RETRY_UPGRADE_WITH_ANOTHER_PAYMENT_METHOD: "retry_upgrade_with_another_payment_method",
- Session.FREE_TRIAL_UPGRADE_FROM_BILLING_PAGE: "free_trial_upgrade_from_billing_page",
- Session.FREE_TRIAL_UPGRADE_FROM_ONBOARDING_PAGE: "free_trial_upgrade_from_onboarding_page",
Session.CARD_UPDATE_FROM_BILLING_PAGE: "card_update_from_billing_page",
+ Session.CARD_UPDATE_FROM_UPGRADE_PAGE: "card_update_from_upgrade_page",
}[self.type]
def to_dict(self) -> Dict[str, Any]:
@@ -136,8 +129,6 @@ class Session(models.Model):
session_dict["status"] = self.get_status_as_string()
session_dict["type"] = self.get_type_as_string()
- if self.payment_intent:
- session_dict["stripe_payment_intent_id"] = self.payment_intent.stripe_payment_intent_id
event = self.get_last_associated_event()
if event is not None:
session_dict["event_handler"] = event.get_event_handler_details_as_dict()
@@ -182,18 +173,15 @@ class PaymentIntent(models.Model):
def get_last_associated_event(self) -> Optional[Event]:
if self.status == PaymentIntent.SUCCEEDED:
event_type = "payment_intent.succeeded"
- elif self.status == PaymentIntent.REQUIRES_PAYMENT_METHOD:
- event_type = "payment_intent.payment_failed"
- else:
- return None
+ # TODO: Add test for this case. Not sure how to trigger naturally.
+ else: # nocoverage
+ return None # nocoverage
return get_last_associated_event_by_type(self, event_type)
def to_dict(self) -> Dict[str, Any]:
payment_intent_dict: Dict[str, Any] = {}
payment_intent_dict["status"] = self.get_status_as_string()
event = self.get_last_associated_event()
- if self.last_payment_error:
- payment_intent_dict["last_payment_error"] = self.last_payment_error
if event is not None:
payment_intent_dict["event_handler"] = event.get_event_handler_details_as_dict()
return payment_intent_dict
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.1.json
index 19898ec5174..fb205392b34 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.1.json
@@ -63,7 +63,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_details": {
"card": {
"amount_authorized": 7200,
@@ -105,7 +105,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLmktKoGMgYrcqQJ_XQ6LBZLSpoFwx3AcKTCrmps2vSpTYEuUPpKK37EcqScvxgnj4SR9xDWiSPE9-Ni",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKN2236oGMgb9kDIy5gQ6LBYzDvh-SG906rLxQE_yro-FRsYkoPjn-i_qJQdTIK-xEdHTCA_2CleF55FL",
"refunded": false,
"refunds": {
"data": [],
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.2.json
index 69dfb73aeb0..dfc0f1c22f2 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.list.2.json
@@ -63,7 +63,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_details": {
"card": {
"amount_authorized": 36000,
@@ -105,7 +105,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMyktKoGMgY7jXPALx46LBZ93Aicbpv_SAI_VTk6csq3v1o-6Isr2CHYie17adWgts9dL_uZ8bLzxthw",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKOe236oGMgZY2Sh2lSg6LBb_LqNtJ4g5re1ZvG-9hZPTBnBy7l5cYScBJtuv7oe8msjRYfJ1bGTbhoQG",
"refunded": false,
"refunds": {
"data": [],
@@ -187,7 +187,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_details": {
"card": {
"amount_authorized": 7200,
@@ -229,7 +229,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMyktKoGMgYMbX-GnOM6LBagBjW6OMx9HAU5uMfOZ8snKne1PHYDc42XAxy7IdyNE7BH38b7vW-rIqLk",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKOe236oGMgZDkV9htao6LBYQiYhe60bGjGf7_sAYhEiv6yf9BiA0g9RgNDZptf6yXj1P7GRKECNYSf7I",
"refunded": false,
"refunds": {
"data": [],
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.1.json
index 73eeffc330d..6e301160837 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "default_payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.2.json
index 437a027a25b..47132fea929 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.modify.2.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "default_payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json
similarity index 96%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.retrieve.1.json
rename to corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json
index 02def09ea59..a024a2c67c5 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json
@@ -40,7 +40,7 @@
"fingerprint": "NORMALIZED000001",
"funding": "credit",
"generated_from": null,
- "last4": "0341",
+ "last4": "4242",
"networks": {
"available": [
"visa"
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "id": "pm_1ODZbrDEQaroqDjskigXZyia",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.2.json
similarity index 96%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.retrieve.1.json
rename to corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.2.json
index 167af511c32..a024a2c67c5 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.2.json
@@ -40,7 +40,7 @@
"fingerprint": "NORMALIZED000001",
"funding": "credit",
"generated_from": null,
- "last4": "0341",
+ "last4": "4242",
"networks": {
"available": [
"visa"
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
+ "id": "pm_1ODZbrDEQaroqDjskigXZyia",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.3.json
new file mode 100644
index 00000000000..a024a2c67c5
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbrDEQaroqDjskigXZyia",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.4.json
new file mode 100644
index 00000000000..a024a2c67c5
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbrDEQaroqDjskigXZyia",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.5.json
new file mode 100644
index 00000000000..6c7e9d9f07f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZc2DEQaroqDjsTb1INXJw",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.6.json
new file mode 100644
index 00000000000..6c7e9d9f07f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZc2DEQaroqDjsTb1INXJw",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.7.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.7.json
new file mode 100644
index 00000000000..6c7e9d9f07f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.7.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZc2DEQaroqDjsTb1INXJw",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.8.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.8.json
new file mode 100644
index 00000000000..6c7e9d9f07f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.8.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZc2DEQaroqDjsTb1INXJw",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.1.json
index 1f0c27c02c6..ff44f98e8cc 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.1.json
@@ -5,83 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "amount": 6400,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": 1000000000,
- "cancellation_reason": "void_invoice",
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000003"
- },
- "client_secret": "pi_NORMALIZED00000000000003_secret_fYThlYzmA6ZihKmrZLnmWcTvW",
- "confirmation_method": "automatic",
+ "address": null,
+ "balance": 0,
"created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0002",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000001",
- "last_payment_error": null,
- "latest_charge": null,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
+ "footer": null,
+ "rendering_options": null
+ },
"livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- },
- "cashapp": {},
- "wechat_pay": {
- "app_id": null,
- "client": null
- }
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "payment_method_types": [
- "ach_credit_transfer",
- "card",
- "cashapp",
- "wechat_pay"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
"shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "canceled",
- "transfer_data": null,
- "transfer_group": null
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_3OAbimDEQaroqDjs0BaEBsNX",
+ "id": "evt_1ODZbtDEQaroqDjsr9pwx0zW",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "25effa1f-8fed-45ea-a660-fd0b33abc23c"
+ "idempotency_key": "41dc2066-d11d-4609-b5e9-930cca787983"
},
- "type": "payment_intent.canceled"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.5.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.10.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.5.json
rename to corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.10.json
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.2.json
index 0dfa42c094b..d760a7842dc 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.2.json
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_details": {
"card": {
"amount_authorized": 7200,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLKktKoGMgZfETNIDN86LBY50xSk957U6AlRoP5-YOxSRkjaDyWZxvhpX5Lq7EfiLZlknEWX_xe2Db-Q",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNi236oGMgZLhECvzRM6LBYsJNRLODsJSDBJeGkVl6-qT9lHjspeJ0IxSgujORyVZ0mCEfc6KC3njyfT",
"refunded": false,
"refunds": {
"data": [],
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_U9fLWaQ5foMLX6li0E7nIl4wX",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_eEcskqSx0TpRGq2xx4S3jQfjE",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbiwDEQaroqDjs1KG0PpkK",
+ "id": "evt_3ODZbvDEQaroqDjs1tq9QfVM",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "a6fbc05f-71a7-41dd-89d9-d83491088de5"
+ "idempotency_key": "0ac0ca55-e728-4a70-a0e4-0af3358d334d"
},
"type": "payment_intent.succeeded"
},
@@ -279,7 +279,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_details": {
"card": {
"amount_authorized": 7200,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLKktKoGMgYmLI2wbBc6LBayDyiusyUGbOxDSVFnS4jnIBbaP5HhJCOa-jwmTSISDTAtkNQlQs2ntZKo",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNi236oGMgbSxzKAd6s6LBbAPq0vr1B4leqlRTD5gW-nTyic4VMvXjm9o3wiSF9om47ZJpnK_YPUynWs",
"refunded": false,
"refunds": {
"data": [],
@@ -341,412 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbiwDEQaroqDjs1MgkdMZv",
+ "id": "evt_3ODZbvDEQaroqDjs1KF32dZ0",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "a6fbc05f-71a7-41dd-89d9-d83491088de5"
+ "idempotency_key": "0ac0ca55-e728-4a70-a0e4-0af3358d334d"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbj2DEQaroqDjsdHXrdECt",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "ba127619-d57d-424c-bc0d-e1b5d6e75b4f"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiyDEQaroqDjsEnpR1Onp_secret_OyYqFrkey3OlMfxWtyreL2AbO9RHVB4",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiyDEQaroqDjsEnpR1Onp",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiyDEQaroqDjsnLExjW56",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbizDEQaroqDjsMSKWCeS4",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "b367784c-9178-4e50-ad4b-33271f44771f"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbizDEQaroqDjs7C1ESMag",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "b367784c-9178-4e50-ad4b-33271f44771f"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiyDEQaroqDjsEnpR1Onp_secret_OyYqFrkey3OlMfxWtyreL2AbO9RHVB4",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiyDEQaroqDjsEnpR1Onp",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiyDEQaroqDjsnLExjW56",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbizDEQaroqDjs12Wkj59b",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "b367784c-9178-4e50-ad4b-33271f44771f"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbixDEQaroqDjsZ13bFTzk_secret_OyYqTKT3uNo6hXb6nycNN82HUV4tLVa",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbixDEQaroqDjsZ13bFTzk",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbixDEQaroqDjswQf5925l",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "2f531396-87a0-4a7a-85f2-4cbeae89359b"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 7200,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_U9fLWaQ5foMLX6li0E7nIl4wX",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $12.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "1200",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbiwDEQaroqDjs19zAFXo5",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "dcb3c560-eb12-48b6-a8b1-c3781dc8dc47"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbivDEQaroqDjsBYwBWKGq",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "d7e3039e-deb3-4b01-b0d4-cb3365326a0e"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.3.json
index f390015a023..af7822ba08d 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.3.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -67,8 +67,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -157,7 +157,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -210,18 +210,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbjADEQaroqDjswTbvBGJ7",
+ "id": "evt_1ODZbzDEQaroqDjsSqDkgbYD",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "da0bb2e0-e63b-4ef2-8190-e4a898a67895"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "6959d907-781b-4140-987b-0eec0b9e2600"
},
- "type": "invoice.finalized"
+ "type": "invoice.paid"
},
{
"api_version": "2020-08-27",
@@ -269,9 +269,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUx0200otAxmBG3?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUx0200otAxmBG3/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -289,11 +289,234 @@
"livemode": false,
"metadata": {},
"object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1200,
+ "unit_amount_decimal": "1200"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "1200"
+ },
+ {
+ "amount": -7200,
+ "amount_excluding_tax": -7200,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
"period": {
"end": 1000000000,
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -7200,
+ "unit_amount_decimal": "-7200"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-7200"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZbzDEQaroqDjsdAV06ZBx",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "6959d907-781b-4140-987b-0eec0b9e2600"
+ },
+ "type": "invoice.finalized"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 7200,
+ "amount_excluding_tax": 7200,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
@@ -380,7 +603,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -433,7 +656,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -457,13 +680,13 @@
}
}
},
- "id": "evt_1OAbjADEQaroqDjsSI8lFXJv",
+ "id": "evt_1ODZbzDEQaroqDjslGBubqGq",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "da0bb2e0-e63b-4ef2-8190-e4a898a67895"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "6959d907-781b-4140-987b-0eec0b9e2600"
},
"type": "invoice.updated"
},
@@ -514,7 +737,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -534,8 +757,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -624,7 +847,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -680,13 +903,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbj8DEQaroqDjskFTdkB1y",
+ "id": "evt_1ODZbyDEQaroqDjsHWOPcotK",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "54d61ab3-cd30-4b7a-ad40-0dce334dd232"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "f0d2067b-5212-4574-94d5-e10b7c223df7"
},
"type": "invoice.created"
},
@@ -708,8 +931,8 @@
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -742,13 +965,13 @@
"unit_amount_decimal": "1200"
}
},
- "id": "evt_1OAbj7DEQaroqDjs4SWJFkYg",
+ "id": "evt_1ODZbxDEQaroqDjsOsWzWoRk",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "2ae230b6-12fb-4c3a-b8b7-6ecd041a313c"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "b84a2ba1-c9a7-49d9-a07f-f621f2973389"
},
"type": "invoiceitem.created"
},
@@ -804,13 +1027,13 @@
"unit_amount_decimal": "-7200"
}
},
- "id": "evt_1OAbj5DEQaroqDjsNe3rtI3x",
+ "id": "evt_1ODZbxDEQaroqDjsgtWSRoeV",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "22eeb342-33df-4bcb-8750-7c8649ef72e3"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "b4d2796f-2f92-47c1-9c28-2a43cc0ba533"
},
"type": "invoiceitem.created"
},
@@ -833,7 +1056,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "default_payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"footer": null,
"rendering_options": null
},
@@ -856,13 +1079,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbj5DEQaroqDjsGpvAlLYX",
+ "id": "evt_1ODZbxDEQaroqDjsLaFyBWUD",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "22eeb342-33df-4bcb-8750-7c8649ef72e3"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "b4d2796f-2f92-47c1-9c28-2a43cc0ba533"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.4.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.4.json
index 50d7fccd947..d1d17e00902 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.4.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -67,8 +67,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -157,7 +157,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -210,241 +210,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbjADEQaroqDjsRFLyV68r",
+ "id": "evt_1ODZbzDEQaroqDjsEDioNsUQ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "da0bb2e0-e63b-4ef2-8190-e4a898a67895"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "6959d907-781b-4140-987b-0eec0b9e2600"
},
"type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 7200,
- "amount_excluding_tax": 7200,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 1200,
- "unit_amount_decimal": "1200"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "1200"
- },
- {
- "amount": -7200,
- "amount_excluding_tax": -7200,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -7200,
- "unit_amount_decimal": "-7200"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-7200"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbjADEQaroqDjsHfm4lKFu",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "da0bb2e0-e63b-4ef2-8190-e4a898a67895"
- },
- "type": "invoice.paid"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.6.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.6.json
index 7e1c2528eaf..5981e002507 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.6.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.6.json
@@ -5,223 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
+ "address": null,
+ "balance": 0,
"created": 1000000000,
"currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "default_currency": "usd",
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUy0200wEanKwxF/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 7200,
- "amount_excluding_tax": 7200,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 1200,
- "unit_amount_decimal": "1200"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "1200"
- },
- {
- "amount": -7200,
- "amount_excluding_tax": -7200,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -7200,
- "unit_amount_decimal": "-7200"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-7200"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": "pm_1ODZbrDEQaroqDjskigXZyia"
+ }
}
},
- "id": "evt_1OAbjADEQaroqDjsRFLyV68r",
+ "id": "evt_1ODZc4DEQaroqDjsWF37D8Rz",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "da0bb2e0-e63b-4ef2-8190-e4a898a67895"
+ "id": "req_NORMALIZED0007",
+ "idempotency_key": "3fe0ab0e-2fd6-49e3-91f3-57b8528e1307"
},
- "type": "invoice.payment_succeeded"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.7.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.7.json
index ac8180b149c..782571f4707 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.7.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.7.json
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_details": {
"card": {
"amount_authorized": 36000,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMWktKoGMgbBejqty7k6LBay1D-S4hg39Q9UDIOGUp79dAR3ZWzowgod2EPK3yoyXY0CYXWsROxc7cuw",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKOS236oGMgYw055P3qw6LBZCsxhPPl4eLLCFRThPYz4w7v_KNCjf_Fuy32A3nKYCv3i3h-JjPf3m-v6U",
"refunded": false,
"refunds": {
"data": [],
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_IM9QK0XPBRsrtvMFpF1HVQGr3",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_5qCtuI33fYqu6bb8Vza1ESJLu",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbjEDEQaroqDjs0Fdo8Gmm",
+ "id": "evt_3ODZc7DEQaroqDjs1nXfh7h3",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "ead047f4-390c-4143-bca4-b560cb2c76af"
+ "id": "req_NORMALIZED0008",
+ "idempotency_key": "dcf51f3d-2d3d-450b-9906-4d052168dd61"
},
"type": "payment_intent.succeeded"
},
@@ -279,7 +279,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_details": {
"card": {
"amount_authorized": 36000,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMWktKoGMgYpVepO4vY6LBbu8Gdq5swMUKpN609lyeB_YsbAnOp7XAL-DHUMj7-nEPl0juPLx6Hv11vd",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKOS236oGMgZ8wiMJU_k6LBYWx6PEOZgmJ6-py6hrR-CI7w1iP8Gwuppd57l-oKhQfd7Ns4lQnt_xDF-_",
"refunded": false,
"refunds": {
"data": [],
@@ -341,364 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbjEDEQaroqDjs0Jr4G9pD",
+ "id": "evt_3ODZc7DEQaroqDjs1awhlLav",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "ead047f4-390c-4143-bca4-b560cb2c76af"
+ "id": "req_NORMALIZED0008",
+ "idempotency_key": "dcf51f3d-2d3d-450b-9906-4d052168dd61"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 2,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ"
- }
- }
- },
- "id": "evt_1OAbjJDEQaroqDjsiVYBYR7z",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0013",
- "idempotency_key": "4ebda7fb-5c3a-4ce9-8abc-9cade78757d3"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbjHDEQaroqDjsiyGUfkGg_secret_OyYq1ljcbx3AZiCSK143sZdt7S0n6pN",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbjHDEQaroqDjsiyGUfkGg",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbjHDEQaroqDjswrjSFGn9",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbjIDEQaroqDjsAq5yUHSA",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0014",
- "idempotency_key": "703bb85b-e5cd-4cde-9b55-b712437a5113"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbjHDEQaroqDjsFfj8byC8",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbjHDEQaroqDjs5X4eBOmU",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0014",
- "idempotency_key": "703bb85b-e5cd-4cde-9b55-b712437a5113"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbjHDEQaroqDjsiyGUfkGg_secret_OyYq1ljcbx3AZiCSK143sZdt7S0n6pN",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbjHDEQaroqDjsiyGUfkGg",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbjHDEQaroqDjswrjSFGn9",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbjHDEQaroqDjsj1Jcj4L7",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0014",
- "idempotency_key": "703bb85b-e5cd-4cde-9b55-b712437a5113"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbjFDEQaroqDjsOtWXOh3z_secret_OyYqDwZSEotDZcPqC8EEXDlXcWpwH0i",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbjFDEQaroqDjsOtWXOh3z",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbjFDEQaroqDjslF0bckh4",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0015",
- "idempotency_key": "ab40363f-ed16-49a3-abcb-e0050fe97641"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 36000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_IM9QK0XPBRsrtvMFpF1HVQGr3",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $60.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "6000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbjEDEQaroqDjs04u0RIvp",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0016",
- "idempotency_key": "5e88c770-f3aa-4e2f-83fd-fa3bfb251535"
- },
- "type": "payment_intent.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.8.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.8.json
index fbfb0b66533..58edcca0eb2 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.8.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.8.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -157,7 +157,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
@@ -213,459 +213,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbjSDEQaroqDjsSMoBdCTk",
+ "id": "evt_1ODZcADEQaroqDjsehqtPOpi",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0017",
- "idempotency_key": "f5b1be17-0d94-4f03-b53e-ca7abb7ea36c"
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 36000,
- "amount_excluding_tax": 36000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 6000,
- "unit_amount_decimal": "6000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "6000"
- },
- {
- "amount": -36000,
- "amount_excluding_tax": -36000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -36000,
- "unit_amount_decimal": "-36000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-36000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
- }
- },
- "id": "evt_1OAbjSDEQaroqDjsHvqUweFf",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0017",
- "idempotency_key": "f5b1be17-0d94-4f03-b53e-ca7abb7ea36c"
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 36000,
- "amount_excluding_tax": 36000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 6000,
- "unit_amount_decimal": "6000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "6000"
- },
- {
- "amount": -36000,
- "amount_excluding_tax": -36000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -36000,
- "unit_amount_decimal": "-36000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-36000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
- }
- },
- "id": "evt_1OAbjSDEQaroqDjs52kQBIea",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0017",
- "idempotency_key": "f5b1be17-0d94-4f03-b53e-ca7abb7ea36c"
+ "id": "req_NORMALIZED0009",
+ "idempotency_key": "41832353-17f6-4b4f-9204-193000c3bfdc"
},
"type": "invoice.finalized"
},
@@ -715,9 +269,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -826,7 +380,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
@@ -903,13 +457,13 @@
}
}
},
- "id": "evt_1OAbjSDEQaroqDjsthbEfwPu",
+ "id": "evt_1ODZcADEQaroqDjsO0GefrRE",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0017",
- "idempotency_key": "f5b1be17-0d94-4f03-b53e-ca7abb7ea36c"
+ "id": "req_NORMALIZED0009",
+ "idempotency_key": "41832353-17f6-4b4f-9204-193000c3bfdc"
},
"type": "invoice.updated"
},
@@ -960,7 +514,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000003",
+ "id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -1070,7 +624,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
@@ -1126,13 +680,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbjRDEQaroqDjsNjOr65Yz",
+ "id": "evt_1ODZc9DEQaroqDjsPUU3iHSB",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0018",
- "idempotency_key": "361427f6-9d7d-4641-a46d-57e3878004d6"
+ "id": "req_NORMALIZED0010",
+ "idempotency_key": "fe30e876-9859-407d-bd3e-63d4e1d300f5"
},
"type": "invoice.created"
},
@@ -1188,13 +742,13 @@
"unit_amount_decimal": "6000"
}
},
- "id": "evt_1OAbjRDEQaroqDjsFxUR9lEq",
+ "id": "evt_1ODZc9DEQaroqDjsru1mZ0jz",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0019",
- "idempotency_key": "d1af4863-6833-4171-81e4-d0d90b29ba5b"
+ "id": "req_NORMALIZED0011",
+ "idempotency_key": "3dacffcf-19f7-4572-98e1-e9befb5a423b"
},
"type": "invoiceitem.created"
},
@@ -1250,13 +804,13 @@
"unit_amount_decimal": "-36000"
}
},
- "id": "evt_1OAbjPDEQaroqDjsuOddcwy8",
+ "id": "evt_1ODZc8DEQaroqDjsdfUa3CVQ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0020",
- "idempotency_key": "3120bbe1-9648-4af0-a7cb-70ac5bfc04a2"
+ "id": "req_NORMALIZED0012",
+ "idempotency_key": "eca43853-49ff-49df-a4dd-5e7220906e4d"
},
"type": "invoiceitem.created"
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.9.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.9.json
index 6d922067afe..4226f3c9ff9 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.9.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Event.list.9.json
@@ -1,5 +1,452 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE10200Y7OuDtPX?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE10200Y7OuDtPX/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 36000,
+ "amount_excluding_tax": 36000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000003",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 6000,
+ "unit_amount_decimal": "6000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "6000"
+ },
+ {
+ "amount": -36000,
+ "amount_excluding_tax": -36000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000004",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -36000,
+ "unit_amount_decimal": "-36000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-36000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0003",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZcBDEQaroqDjsC37fkyX9",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 1,
+ "request": {
+ "id": "req_NORMALIZED0009",
+ "idempotency_key": "41832353-17f6-4b4f-9204-193000c3bfdc"
+ },
+ "type": "invoice.payment_succeeded"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 36000,
+ "amount_excluding_tax": 36000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000003",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 6000,
+ "unit_amount_decimal": "6000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "6000"
+ },
+ {
+ "amount": -36000,
+ "amount_excluding_tax": -36000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000004",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -36000,
+ "unit_amount_decimal": "-36000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-36000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0003",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZcADEQaroqDjs1xtT22P8",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 1,
+ "request": {
+ "id": "req_NORMALIZED0009",
+ "idempotency_key": "41832353-17f6-4b4f-9204-193000c3bfdc"
+ },
+ "type": "invoice.paid"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.1.json
index 3e246456eab..bfed2ac7231 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.1.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -61,8 +61,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.2.json
index 846d0ffb959..0049f713cfd 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.2.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000003",
+ "id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.3.json
index deac80a172f..65e29abd681 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.3.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.create.3.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000004",
+ "id": "in_NORMALIZED00000000000003",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -101,7 +101,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.1.json
index 3ab70efcffe..9ac3cd70004 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUx0200otAxmBG3?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTUx0200otAxmBG3/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDAz0200KsIFNryD/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.2.json
index 2e50ec398db..0cd950158ce 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcw0200rWnYu5C6/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE00200ZmNmTYH5/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.3.json
index 35ee7a5555e..3232d93491f 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.3.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.finalize_invoice.3.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyM1ZjWEROSGJMNWtrMHFKNFY5ZW1DekRtM2cxLDkwMDkwNTc3020054DiyClm?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyM1ZjWEROSGJMNWtrMHFKNFY5ZW1DekRtM2cxLDkwMDkwNTc3020054DiyClm/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNySk1zeENWY3I0d1JOT3hKa29LdWxDaWhkTTQ3LDkwNzk3NDE40200wLpqaPJl?s=ap",
+ "id": "in_NORMALIZED00000000000003",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNySk1zeENWY3I0d1JOT3hKa29LdWxDaWhkTTQ3LDkwNzk3NDE40200wLpqaPJl/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -101,7 +101,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
@@ -111,7 +111,7 @@
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -154,5 +154,5 @@
"total_excluding_tax": 24000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.2.json
index 4843232f80b..a7ad652901b 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTU00200ozOzXCq5?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTU00200ozOzXCq5/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDA10200t065vkMv?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDA10200t065vkMv/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -63,8 +63,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -153,7 +153,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.4.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.4.json
index caa0ffeab6d..79b29747a98 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcz0200NuJEg74w?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTcz0200NuJEg74w/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE20200Pd5LpP2O?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE20200Pd5LpP2O/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -153,7 +153,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
@@ -250,9 +250,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTcz0200z2u9pNME?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTcz0200z2u9pNME/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDE20200ZWpC82Ov?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDE20200ZWpC82Ov/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -271,8 +271,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -361,7 +361,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.5.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.5.json
index 107bef86393..4921950c255 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.5.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.5.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyM1ZjWEROSGJMNWtrMHFKNFY5ZW1DekRtM2cxLDkwMDkwNTc40200Sj4IFpmz?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyM1ZjWEROSGJMNWtrMHFKNFY5ZW1DekRtM2cxLDkwMDkwNTc40200Sj4IFpmz/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNySk1zeENWY3I0d1JOT3hKa29LdWxDaWhkTTQ3LDkwNzk3NDE40200wLpqaPJl?s=ap",
+ "id": "in_NORMALIZED00000000000003",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNySk1zeENWY3I0d1JOT3hKa29LdWxDaWhkTTQ3LDkwNzk3NDE40200wLpqaPJl/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -103,7 +103,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
@@ -113,7 +113,7 @@
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -156,7 +156,7 @@
"total_excluding_tax": 24000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTc40200bk3mcbnW?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlyRHlaT1pCN2U0dG8xY2hwejVidFN6a3ZSMHRuLDkwMDkwNTc40200bk3mcbnW/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE40200GbLelWSs?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyalVqNnpnVDNBa2xlclBsZFp2RXpOejlDcEpULDkwNzk3NDE40200GbLelWSs/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -311,7 +311,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
@@ -408,9 +408,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTc40200iIpWcfWk?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxMmxZbXZoUnVicXBZajdsRFU4azJSWVppaDNSLDkwMDkwNTc40200iIpWcfWk/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDE402002NMWc89k?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyTndOWlV1UGxOd0hiRlRUcWpKY2JNb3dOck1NLDkwNzk3NDE402002NMWc89k/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -429,8 +429,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -519,7 +519,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.2.json
index 638ff36ce3e..f22b349bfee 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.2.json
@@ -12,8 +12,8 @@
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.confirm.1.json
deleted file mode 100644
index 74f1e171d9b..00000000000
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 7200,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 7200,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 7200,
- "amount_captured": 7200,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $12.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "1200",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
- "payment_method_details": {
- "card": {
- "amount_authorized": 7200,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 7200,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLKktKoGMgYimrXpHqA6LBbX51UEvwndRXqUkshrzze-vtY1kaBfu3kQ_cy4eOwD7ZOJ0MTItvKdslAN",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_U9fLWaQ5foMLX6li0E7nIl4wX",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $12.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "1200",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.confirm.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.confirm.2.json
deleted file mode 100644
index 411de471b68..00000000000
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.confirm.2.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 36000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 36000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 36000,
- "amount_captured": 36000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000002",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $60.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "6000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
- "payment_method_details": {
- "card": {
- "amount_authorized": 36000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 36000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMWktKoGMgb3nDVqmxw6LBbhC0PW9T-U53VSB9Q3DZCtbnQ72IGDALfDXWC-jcTkpT6EUGI9HGa9d-fo",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_IM9QK0XPBRsrtvMFpF1HVQGr3",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $60.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "6000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.1.json
index 25f7388bb8e..484575cd6f2 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 7200,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,13 +12,138 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 7200,
+ "amount_captured": 7200,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $12.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "1200",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 7200,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 7200,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNi236oGMgYSbL4UQx06LBYNKoREIpelmHkF5IANdnuSUHLVwxtzJP92-ZeqtRDXtpTdoXXm0T4Q9dL1",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
+ "total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_U9fLWaQ5foMLX6li0E7nIl4wX",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_eEcskqSx0TpRGq2xx4S3jQfjE",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -27,7 +152,7 @@
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.2.json
index 9a90f573ad3..ca06fc243eb 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--PaymentIntent.create.2.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 36000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,13 +12,138 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 36000,
+ "amount_captured": 36000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000002",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $60.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000002",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "6000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 36000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 36000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKOO236oGMgb7SRMnvZg6LBYjPFCRTCANLJrlbiQozsyL178UivzRIPl606cMrYLbaX1ye26dEim5j_BO",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
+ "total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_IM9QK0XPBRsrtvMFpF1HVQGr3",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_5qCtuI33fYqu6bb8Vza1ESJLu",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -27,7 +152,7 @@
"id": "pi_NORMALIZED00000000000002",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000002",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.1.json
index d0fa6f6457e..0968dbf618c 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbiyDEQaroqDjsEnpR1Onp_secret_OyYqFrkey3OlMfxWtyreL2AbO9RHVB4",
+ "client_secret": "seti_1ODZbrDEQaroqDjsjUPMca0a_secret_P1crN749fbuxucilbRjnmjwz8bP6QLK",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbiyDEQaroqDjsEnpR1Onp",
+ "id": "seti_1ODZbrDEQaroqDjsjUPMca0a",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbiyDEQaroqDjsnLExjW56",
+ "latest_attempt": "setatt_1ODZbrDEQaroqDjs4ezW2OlK",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.2.json
index bcfe383019a..1cf9dff22f9 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.create.2.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbjHDEQaroqDjsiyGUfkGg_secret_OyYq1ljcbx3AZiCSK143sZdt7S0n6pN",
+ "client_secret": "seti_1ODZc3DEQaroqDjspauxhmiC_secret_P1cr1sZRe9FuuhTJVE4e61XTKnw5Kzb",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbjHDEQaroqDjsiyGUfkGg",
+ "id": "seti_1ODZc3DEQaroqDjspauxhmiC",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbjHDEQaroqDjswrjSFGn9",
+ "latest_attempt": "setatt_1ODZc3DEQaroqDjsxjZhA8wm",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.1.json
index b760618cd46..91ef3e1d6a7 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbixDEQaroqDjsZ13bFTzk_secret_OyYqTKT3uNo6hXb6nycNN82HUV4tLVa",
+ "client_secret": "seti_1ODZbqDEQaroqDjsknIvOLB2_secret_P1crtWwt6m1tbC8nONQGEsNErMusQiE",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbixDEQaroqDjsZ13bFTzk",
+ "id": "seti_1ODZbqDEQaroqDjsknIvOLB2",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.2.json
index d7bfa2cbc42..2f1ebb4d932 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.list.2.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbjFDEQaroqDjsOtWXOh3z_secret_OyYqDwZSEotDZcPqC8EEXDlXcWpwH0i",
+ "client_secret": "seti_1ODZc2DEQaroqDjsejHIY8Wc_secret_P1crh66ebsjpd6SXH8ixmBuZ9x1878N",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbjFDEQaroqDjsOtWXOh3z",
+ "id": "seti_1ODZc2DEQaroqDjsejHIY8Wc",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.1.json
index d0fa6f6457e..0968dbf618c 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbiyDEQaroqDjsEnpR1Onp_secret_OyYqFrkey3OlMfxWtyreL2AbO9RHVB4",
+ "client_secret": "seti_1ODZbrDEQaroqDjsjUPMca0a_secret_P1crN749fbuxucilbRjnmjwz8bP6QLK",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbiyDEQaroqDjsEnpR1Onp",
+ "id": "seti_1ODZbrDEQaroqDjsjUPMca0a",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbiyDEQaroqDjsnLExjW56",
+ "latest_attempt": "setatt_1ODZbrDEQaroqDjs4ezW2OlK",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiyDEQaroqDjs3ViUEwAQ",
+ "payment_method": "pm_1ODZbrDEQaroqDjskigXZyia",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.2.json
index bcfe383019a..1cf9dff22f9 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--SetupIntent.retrieve.2.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbjHDEQaroqDjsiyGUfkGg_secret_OyYq1ljcbx3AZiCSK143sZdt7S0n6pN",
+ "client_secret": "seti_1ODZc3DEQaroqDjspauxhmiC_secret_P1cr1sZRe9FuuhTJVE4e61XTKnw5Kzb",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbjHDEQaroqDjsiyGUfkGg",
+ "id": "seti_1ODZc3DEQaroqDjspauxhmiC",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbjHDEQaroqDjswrjSFGn9",
+ "latest_attempt": "setatt_1ODZc3DEQaroqDjsxjZhA8wm",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbjHDEQaroqDjsFfj8byC8",
+ "payment_method": "pm_1ODZc2DEQaroqDjsTb1INXJw",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.1.json
index df73c20f9df..322f1f00194 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02Z5ZWoaj9BNmgBmGSOWkzCIOee3905mO0A4AaeSETi2qfDk",
+ "id": "cs_test_NORMALIZED02QMy1mIZ04tCo36HFoXSMTpehz2ws7iPkk0v5IX6gyW6qdd",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "1200",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbixDEQaroqDjsZ13bFTzk",
+ "setup_intent": "seti_1ODZbqDEQaroqDjsknIvOLB2",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02Z5ZWoaj9BNmgBmGSOWkzCIOee3905mO0A4AaeSETi2qfDk#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02QMy1mIZ04tCo36HFoXSMTpehz2ws7iPkk0v5IX6gyW6qdd#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.2.json
index 54fba19048c..ead18345471 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.create.2.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03LS5wbvnBYGdnCEW5t1ot0jYJyM0nR7L9zyMjaPa4nlbim5",
+ "id": "cs_test_NORMALIZED03aUkaVhDwlnsGCE41lkeNdwHArxc37WzPh9abR2ci9LWLlr",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "6000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbjFDEQaroqDjsOtWXOh3z",
+ "setup_intent": "seti_1ODZc2DEQaroqDjsejHIY8Wc",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03LS5wbvnBYGdnCEW5t1ot0jYJyM0nR7L9zyMjaPa4nlbim5#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03aUkaVhDwlnsGCE41lkeNdwHArxc37WzPh9abR2ci9LWLlr#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.1.json
index 5951716d3ca..c94ad3428c5 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02Z5ZWoaj9BNmgBmGSOWkzCIOee3905mO0A4AaeSETi2qfDk",
+ "id": "cs_test_NORMALIZED02QMy1mIZ04tCo36HFoXSMTpehz2ws7iPkk0v5IX6gyW6qdd",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "1200",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbixDEQaroqDjsZ13bFTzk",
+ "setup_intent": "seti_1ODZbqDEQaroqDjsknIvOLB2",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02Z5ZWoaj9BNmgBmGSOWkzCIOee3905mO0A4AaeSETi2qfDk#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02QMy1mIZ04tCo36HFoXSMTpehz2ws7iPkk0v5IX6gyW6qdd#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.2.json
index e6885e5adf6..a0a45bb98ee 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--checkout.Session.list.2.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03LS5wbvnBYGdnCEW5t1ot0jYJyM0nR7L9zyMjaPa4nlbim5",
+ "id": "cs_test_NORMALIZED03aUkaVhDwlnsGCE41lkeNdwHArxc37WzPh9abR2ci9LWLlr",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "6000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbjFDEQaroqDjsOtWXOh3z",
+ "setup_intent": "seti_1ODZc2DEQaroqDjsejHIY8Wc",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03LS5wbvnBYGdnCEW5t1ot0jYJyM0nR7L9zyMjaPa4nlbim5#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03aUkaVhDwlnsGCE41lkeNdwHArxc37WzPh9abR2ci9LWLlr#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.create.1.json
index 593a07ed0c8..d33a6750eaf 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.create.1.json
@@ -8,7 +8,7 @@
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0001",
"invoice_prefix": "NORMA01",
"invoice_settings": {
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.modify.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.modify.1.json
index eaf4d0d60de..ece47c50a8c 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.modify.1.json
@@ -8,12 +8,12 @@
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0001",
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "default_payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.1.json
index 95c8cebf1f0..bd73e65441c 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.1.json
@@ -2,13 +2,13 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0001",
"invoice_prefix": "NORMA01",
"invoice_settings": {
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "id": "pm_1ODZXmDEQaroqDjsemP192DM",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.2.json
index 95c8cebf1f0..bd73e65441c 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.2.json
@@ -2,13 +2,13 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0001",
"invoice_prefix": "NORMA01",
"invoice_settings": {
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "id": "pm_1ODZXmDEQaroqDjsemP192DM",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.3.json
new file mode 100644
index 00000000000..bd73e65441c
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXmDEQaroqDjsemP192DM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.4.json
new file mode 100644
index 00000000000..bd73e65441c
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXmDEQaroqDjsemP192DM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.5.json
new file mode 100644
index 00000000000..d1d7f649fc6
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXmDEQaroqDjsemP192DM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.6.json
new file mode 100644
index 00000000000..d1d7f649fc6
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXmDEQaroqDjsemP192DM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.1.json
index 792d78c3617..b7dd6387d08 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.1.json
@@ -5,273 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 80697,
- "amount_paid": 0,
- "amount_remaining": 80697,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
+ "address": null,
+ "balance": 0,
"created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqaGQ3elJQNENCaVZHMVZqdGVyMzFmWFJZck1MLDkwMDkwMTE002002tYuWb47?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqaGQ3elJQNENCaVZHMVZqdGVyMzFmWFJZck1MLDkwMDkwMTE002002tYuWb47/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 7255,
- "amount_excluding_tax": 7255,
- "currency": "usd",
- "description": "Additional license (Feb 5, 2013 - Jan 2, 2014)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1360033445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 7255,
- "unit_amount_decimal": "7255"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "7255"
- },
- {
- "amount": 56000,
- "amount_excluding_tax": 56000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 7,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": 17442,
- "amount_excluding_tax": 17442,
- "currency": "usd",
- "description": "Additional license (Apr 11, 2012 - Jan 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1334113445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5814,
- "unit_amount_decimal": "5814"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 3,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "5814"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 3,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 80697,
- "subtotal_excluding_tax": 80697,
- "tax": null,
- "test_clock": null,
- "total": 80697,
- "total_discount_amounts": [],
- "total_excluding_tax": 80697,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbc7DEQaroqDjsSb1CrgmS",
+ "id": "evt_1ODZXoDEQaroqDjsazKpXqPa",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "7cd9d940-ede9-458e-b191-b3310133d9da"
+ "idempotency_key": "2510229b-ebf4-4842-a22f-206ca6e58136"
},
- "type": "invoice.finalized"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.2.json
index cfda47c8767..7b54abe1246 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.2.json
@@ -66,8 +66,8 @@
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "user_email": "[email protected]",
+ "user_id": "12"
},
"object": "charge",
"on_behalf_of": null,
@@ -81,8 +81,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -122,9 +122,9 @@
},
"type": "card"
},
- "receipt_email": "[email protected]",
+ "receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKI6htKoGMgZEJv0Gk_M6LBbsy-cE95lt_YeePEQfQ75WiLgzUKjcC64s0_AWS2B4Sh8s6V3ZVbiZxriI",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNu036oGMgYd-zDwUuw6LBZhT3N8C0bPauXXVemQlIsPbaqCFAmSYbrogals37GtQCl6K3b6zNvRVKW6",
"refunded": false,
"refunds": {
"data": [],
@@ -147,15 +147,15 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_GjSC2H9KhGusuka7dHcnSXXMq",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_hz13FcMGzbXnd0PjYlT8nOd20",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000001",
@@ -170,13 +170,13 @@
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "user_email": "[email protected]",
+ "user_id": "12"
},
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -190,7 +190,7 @@
"card"
],
"processing": null,
- "receipt_email": "[email protected]",
+ "receipt_email": "[email protected]",
"review": null,
"setup_future_usage": null,
"shipping": null,
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbcCDEQaroqDjs00CvOf1K",
+ "id": "evt_3ODZXqDEQaroqDjs1ntrH5kh",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "c74e41ba-0d59-462f-901d-3653b9691ddd"
+ "idempotency_key": "5a52ddf1-844c-4d63-ada9-31db1bfaa4f4"
},
"type": "payment_intent.succeeded"
},
@@ -263,8 +263,8 @@
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "user_email": "[email protected]",
+ "user_id": "12"
},
"object": "charge",
"on_behalf_of": null,
@@ -278,8 +278,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -319,9 +319,9 @@
},
"type": "card"
},
- "receipt_email": "[email protected]",
+ "receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKI6htKoGMgZcUtV8GJI6LBaeeZaDfZ9Pvd8H6r0A8x9w31_WpGcCgXdwg87kKfcDvl-uO4ENXJjqxjaC",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNu036oGMgZOd5xVIC06LBbj35T1lsN__G2R-COCZaYgQDwkaQMNtFr5RuURrXhrLju3-934HZFxcJSd",
"refunded": false,
"refunds": {
"data": [],
@@ -341,412 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbcCDEQaroqDjs0gbReOHa",
+ "id": "evt_3ODZXqDEQaroqDjs1K3mhFh0",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "c74e41ba-0d59-462f-901d-3653b9691ddd"
+ "idempotency_key": "5a52ddf1-844c-4d63-ada9-31db1bfaa4f4"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbcGDEQaroqDjs0wggukPI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "f914e846-173a-4145-b71c-c2deddb69419"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcFDEQaroqDjsQfMm42ws_secret_OyYjgcW1HC7Fs8iRLfn8iQ35FmvPJmH",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcFDEQaroqDjsQfMm42ws",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbcFDEQaroqDjsJ6wKO7Zx",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcGDEQaroqDjsPyjXOCAc",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "e1214b92-0e5f-42b2-a9ad-fa7d7b905542"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbcFDEQaroqDjs39qXJFeQ",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "e1214b92-0e5f-42b2-a9ad-fa7d7b905542"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcFDEQaroqDjsQfMm42ws_secret_OyYjgcW1HC7Fs8iRLfn8iQ35FmvPJmH",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcFDEQaroqDjsQfMm42ws",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbcFDEQaroqDjsJ6wKO7Zx",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcGDEQaroqDjsOY11fmt3",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "e1214b92-0e5f-42b2-a9ad-fa7d7b905542"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcDDEQaroqDjs6URoWzLY_secret_OyYj6KwwzRa2rP52fvEQaNH3OWcEQfU",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcDDEQaroqDjs6URoWzLY",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcDDEQaroqDjs40IfyFuo",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "ef53c743-c734-4676-afd4-496344b54399"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_GjSC2H9KhGusuka7dHcnSXXMq",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbcCDEQaroqDjs0HuorQuk",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "7c94e31e-d95d-4c8a-870f-222f7c739459"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbcADEQaroqDjs9BctiGlP",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "ed7dbb33-9d63-48ca-a4a8-d77bb716bb9f"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.3.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.3.json
index 84997dda706..a7efa647a72 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.3.json
@@ -29,7 +29,7 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMy02005Nx2aWJ6?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMy02005Nx2aWJ6/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,14 +61,14 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -111,8 +111,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -127,13 +127,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -157,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,7 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -234,13 +234,13 @@
}
}
},
- "id": "evt_1OAbcODEQaroqDjs31hyuOmh",
+ "id": "evt_1ODZXuDEQaroqDjsW9RyOman",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "2541b338-2700-4407-bd3e-79c1c2740aca"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "da047b57-f188-4924-8e4a-e6187bc8f417"
},
"type": "invoice.updated"
},
@@ -273,7 +273,7 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -291,7 +291,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -305,14 +305,14 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -321,13 +321,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -355,8 +355,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -371,13 +371,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -401,7 +401,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -457,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbcNDEQaroqDjsmnQWayuN",
+ "id": "evt_1ODZXtDEQaroqDjsd5IgIcpZ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "39ea7e83-6ae7-458b-9e77-9cd5f6990425"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "d90f4cd9-03ea-464b-91e3-fab9d95fd649"
},
"type": "invoice.created"
},
@@ -479,14 +479,14 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -495,13 +495,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -519,13 +519,13 @@
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbcMDEQaroqDjstamLiIzo",
+ "id": "evt_1ODZXsDEQaroqDjsasSBFkri",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "c7cee662-36c4-4ef2-886d-4091ee4762fa"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "e2158b85-0c14-489d-b784-b2cd136c4e57"
},
"type": "invoiceitem.created"
},
@@ -541,7 +541,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -557,13 +557,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -581,13 +581,13 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbcKDEQaroqDjsEApMF8PG",
+ "id": "evt_1ODZXsDEQaroqDjseyFALkOF",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "a5d39edf-e1d3-4ece-88e6-3ec255393b99"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "47872440-8f04-4e41-ae42-0d1802dd7f70"
},
"type": "invoiceitem.created"
},
@@ -605,12 +605,12 @@
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0001",
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "default_payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"footer": null,
"rendering_options": null
},
@@ -633,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbcKDEQaroqDjsJsD9kXvM",
+ "id": "evt_1ODZXsDEQaroqDjsxhXThZHi",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "a5d39edf-e1d3-4ece-88e6-3ec255393b99"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "47872440-8f04-4e41-ae42-0d1802dd7f70"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.4.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.4.json
index d5eea2b7571..1a55720456e 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.4.json
@@ -29,7 +29,7 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,14 +61,14 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -111,8 +111,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -127,13 +127,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -157,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,239 +210,16 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbcPDEQaroqDjsb2wdOfq8",
+ "id": "evt_1ODZXuDEQaroqDjsCkol6a24",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "2541b338-2700-4407-bd3e-79c1c2740aca"
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcPDEQaroqDjstFj6KICr",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "2541b338-2700-4407-bd3e-79c1c2740aca"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "da047b57-f188-4924-8e4a-e6187bc8f417"
},
"type": "invoice.paid"
},
@@ -475,7 +252,7 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -492,9 +269,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -507,14 +284,14 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -523,13 +300,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -557,8 +334,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -573,13 +350,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -603,12 +380,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -656,16 +433,16 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbcPDEQaroqDjs83DzADF2",
+ "id": "evt_1ODZXuDEQaroqDjsgJ4biVrH",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "2541b338-2700-4407-bd3e-79c1c2740aca"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "da047b57-f188-4924-8e4a-e6187bc8f417"
},
"type": "invoice.finalized"
}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.5.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.5.json
index 6d922067afe..db206261631 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.5.json
@@ -1,5 +1,229 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTUw0200wlo144L1/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZXuDEQaroqDjsd1DnbP9x",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "da047b57-f188-4924-8e4a-e6187bc8f417"
+ },
+ "type": "invoice.payment_succeeded"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.3.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.6.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.3.json
rename to corporate/tests/stripe_fixtures/billing_page_permissions--Event.list.6.json
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.create.1.json
index 0b499482977..371c6917f4a 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.create.1.json
@@ -23,7 +23,7 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,14 +55,14 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.finalize_invoice.1.json
index f46bddea497..564590ffb06 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Invoice.finalize_invoice.1.json
@@ -23,7 +23,7 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMy02005Nx2aWJ6?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMy02005Nx2aWJ6/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTQ50200DCAUTZjK?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNueG01YW5GUGg3ZllyUEdNRVZKcVk4V2xqVVpTLDkwNzk3MTQ50200DCAUTZjK/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,14 +55,14 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,12 +151,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.1.json
index 6624de04de5..fcb1c3c2e9d 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0005",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.2.json
index d1584f278b7..11622f30a73 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--InvoiceItem.create.2.json
@@ -6,14 +6,14 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.confirm.1.json
deleted file mode 100644
index 7c2aede470c..00000000000
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKI6htKoGMgZrRJa5p8c6LBaQqU9TvM6TLNfSG8xRaNTk2w014WdBATBpwnd2VeGr6-PH-_sGeCAZZwrq",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_GjSC2H9KhGusuka7dHcnSXXMq",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.create.1.json
index 40dc978fa0c..a51480c1caa 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "12"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNu036oGMgadvHDoumQ6LBaCwh87rbDR7JldLWCpfETq0ZVKEWyerThjC1H69W6SqHnT3YPHzz-zbVM1",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_GjSC2H9KhGusuka7dHcnSXXMq",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_hz13FcMGzbXnd0PjYlT8nOd20",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -39,13 +164,13 @@
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "user_email": "[email protected]",
+ "user_id": "12"
},
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -59,14 +184,14 @@
"card"
],
"processing": null,
- "receipt_email": "[email protected]",
+ "receipt_email": "[email protected]",
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.create.1.json
index 7133fd9ca21..0aef74f192a 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcFDEQaroqDjsQfMm42ws_secret_OyYjgcW1HC7Fs8iRLfn8iQ35FmvPJmH",
+ "client_secret": "seti_1ODZXnDEQaroqDjsCmngKwK6_secret_P1cnUx7CKKDYjNTRBFefmSYtnoInnsm",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcFDEQaroqDjsQfMm42ws",
+ "id": "seti_1ODZXnDEQaroqDjsCmngKwK6",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbcFDEQaroqDjsJ6wKO7Zx",
+ "latest_attempt": "setatt_1ODZXnDEQaroqDjsCIbUqU1v",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.list.1.json
index 0a47042d792..88ed96dd227 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcDDEQaroqDjs6URoWzLY_secret_OyYj6KwwzRa2rP52fvEQaNH3OWcEQfU",
+ "client_secret": "seti_1ODZXmDEQaroqDjsBNUKYAY6_secret_P1cnHVcN8rotisyb7FEouGSuVo8qMpM",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcDDEQaroqDjs6URoWzLY",
+ "id": "seti_1ODZXmDEQaroqDjsBNUKYAY6",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.retrieve.1.json
index 7133fd9ca21..0aef74f192a 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcFDEQaroqDjsQfMm42ws_secret_OyYjgcW1HC7Fs8iRLfn8iQ35FmvPJmH",
+ "client_secret": "seti_1ODZXnDEQaroqDjsCmngKwK6_secret_P1cnUx7CKKDYjNTRBFefmSYtnoInnsm",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcFDEQaroqDjsQfMm42ws",
+ "id": "seti_1ODZXnDEQaroqDjsCmngKwK6",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbcFDEQaroqDjsJ6wKO7Zx",
+ "latest_attempt": "setatt_1ODZXnDEQaroqDjsCIbUqU1v",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcFDEQaroqDjsNEmc1jWB",
+ "payment_method": "pm_1ODZXmDEQaroqDjsemP192DM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.create.1.json
index af2bf444db1..c5cfbb349a5 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -26,7 +26,7 @@
"customer_creation": null,
"customer_details": {
"address": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"name": null,
"phone": null,
"tax_exempt": null,
@@ -34,23 +34,14 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02JRUj5vEAOxkXQyhCbYvS4X6U195gjUdGkdKfLNabtcQLSZ",
+ "id": "cs_test_NORMALIZED02YTXo9NmXUlmUpuDoN3QunlOBYrNPdDoUq0LYqcyGReAtyO",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "type": "card_update",
+ "user_id": "12"
},
"mode": "setup",
"object": "checkout.session",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbcDDEQaroqDjs6URoWzLY",
+ "setup_intent": "seti_1ODZXmDEQaroqDjsBNUKYAY6",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02JRUj5vEAOxkXQyhCbYvS4X6U195gjUdGkdKfLNabtcQLSZ#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02YTXo9NmXUlmUpuDoN3QunlOBYrNPdDoUq0LYqcyGReAtyO#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.list.1.json
index aad93071419..e8154b1c4c9 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -28,7 +28,7 @@
"customer_creation": null,
"customer_details": {
"address": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"name": null,
"phone": null,
"tax_exempt": null,
@@ -36,23 +36,14 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02JRUj5vEAOxkXQyhCbYvS4X6U195gjUdGkdKfLNabtcQLSZ",
+ "id": "cs_test_NORMALIZED02YTXo9NmXUlmUpuDoN3QunlOBYrNPdDoUq0LYqcyGReAtyO",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "type": "card_update",
+ "user_id": "12"
},
"mode": "setup",
"object": "checkout.session",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbcDDEQaroqDjs6URoWzLY",
+ "setup_intent": "seti_1ODZXmDEQaroqDjsBNUKYAY6",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02JRUj5vEAOxkXQyhCbYvS4X6U195gjUdGkdKfLNabtcQLSZ#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02YTXo9NmXUlmUpuDoN3QunlOBYrNPdDoUq0LYqcyGReAtyO#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.create.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.create.1.json
similarity index 96%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.create.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.create.1.json
index 593a07ed0c8..c9219e149c0 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.create.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"default_currency": null,
"default_source": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.modify.2.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.modify.1.json
similarity index 88%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.modify.2.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.modify.1.json
index d97e930db1c..de2802faa47 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.modify.2.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.modify.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"default_currency": null,
"default_source": null,
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
+ "default_payment_method": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.1.json
new file mode 100644
index 00000000000..b0e27e7b8a3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0341",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.2.json
new file mode 100644
index 00000000000..b0e27e7b8a3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0341",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.3.json
new file mode 100644
index 00000000000..b0e27e7b8a3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0341",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Event.list.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Event.list.1.json
new file mode 100644
index 00000000000..970aa21bcaf
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Event.list.1.json
@@ -0,0 +1,60 @@
+{
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1010000003,
+ "data": {
+ "object": {
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODkuHDEQaroqDjsOkC5GftU",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
+ }
+ },
+ "id": "evt_1ODkuIDEQaroqDjsa7wYDH8M",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0001",
+ "idempotency_key": "62fc5b24-11a5-41cb-89a1-bb4cb117eb3f"
+ },
+ "type": "customer.updated"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Invoice.list.1.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--Invoice.list.1.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--PaymentIntent.create.1.json
similarity index 63%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.confirm.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--PaymentIntent.create.1.json
index 0f3fc717918..fd9dcadf5e8 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.confirm.1.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--PaymentIntent.create.1.json
@@ -46,7 +46,7 @@
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
"captured": false,
- "created": 1000000000,
+ "created": 1010000004,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -86,7 +86,7 @@
},
"paid": false,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "payment_method": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"payment_method_details": {
"card": {
"amount_authorized": null,
@@ -147,9 +147,9 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_35S0RwZGKlxPgcF3b7KQLi1YT",
"confirmation_method": "automatic",
- "created": 1000000000,
+ "created": 1010000005,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -200,9 +200,9 @@
},
"wallet": null
},
- "created": 1000000000,
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -292,15 +292,15 @@
},
"wallet": null
},
- "created": 1000000000,
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1699549665",
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1700300024",
"setup_intent": null,
"source": null,
"type": "card_error"
@@ -314,10 +314,10 @@
"Cache-Control": "no-cache, no-store",
"Connection": "keep-alive",
"Content-Length": "9856",
- "Content-Security-Policy": "report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fconfirm; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'",
+ "Content-Security-Policy": "report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'",
"Content-Type": "application/json",
"Date": "NORMALIZED DATETIME",
- "Idempotency-Key": "5fc43bcc-574e-442d-889c-0028b89993ab",
+ "Idempotency-Key": "82307328-b31e-4861-b497-54c103e2d89d",
"Original-Request": "req_NORMALIZED0002",
"Request-Id": "req_NORMALIZED0002",
"Server": "nginx",
@@ -327,7 +327,7 @@
"Vary": "Origin",
"X-Stripe-Routing-Context-Priority-Tier": "api-testmode"
},
- "http_body": "{\n \"error\": {\n \"charge\": \"ch_NORMALIZED00000000000001\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_intent\": {\n \"id\": \"pi_NORMALIZED00000000000001\",\n \"object\": \"payment_intent\",\n \"amount\": 48000,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {\n }\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_NORMALIZED00000000000001\",\n \"object\": \"charge\",\n \"amount\": 48000,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": null,\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"ZULIP CLOUD STANDARD\",\n \"captured\": false,\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Upgrade to Zulip Cloud Standard, $80.0 x 6\",\n \"destination\": null,\n \"dispute\": null,\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": \"card_declined\",\n \"failure_message\": \"Your card was declined.\",\n \"fraud_details\": {\n },\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"user_email\": \"[email protected]\",\n \"type\": \"upgrade\",\n \"billing_schedule\": \"1\",\n \"price_per_license\": \"8000\",\n \"realm_str\": \"zulip\",\n \"billing_modality\": \"charge_automatically\",\n \"seat_count\": \"6\",\n \"user_id\": \"10\",\n \"license_management\": \"automatic\",\n \"realm_id\": \"2\",\n \"licenses\": \"6\"\n },\n \"on_behalf_of\": null,\n \"order\": null,\n \"outcome\": {\n \"network_status\": \"declined_by_network\",\n \"reason\": \"generic_decline\",\n \"risk_level\": \"normal\",\n \"risk_score\": 19,\n \"seller_message\": \"The bank did not return any further details with this decline.\",\n \"type\": \"issuer_declined\"\n },\n \"paid\": false,\n \"payment_intent\": \"pi_NORMALIZED00000000000001\",\n \"payment_method\": \"pm_1OAbhhDEQaroqDjsHci1uPga\",\n \"payment_method_details\": {\n \"card\": {\n \"amount_authorized\": null,\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"extended_authorization\": {\n \"status\": \"disabled\"\n },\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"incremental_authorization\": {\n \"status\": \"unavailable\"\n },\n \"installments\": null,\n \"last4\": \"0341\",\n \"mandate\": null,\n \"multicapture\": {\n \"status\": \"unavailable\"\n },\n \"network\": \"visa\",\n \"network_token\": {\n \"used\": false\n },\n \"overcapture\": {\n \"maximum_amount_capturable\": 48000,\n \"status\": \"unavailable\"\n },\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": \"[email protected]\",\n \"receipt_number\": null,\n \"receipt_url\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_NORMALIZED00000000000001/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": \"Zulip Cloud Standard\",\n \"statement_descriptor_suffix\": null,\n \"status\": \"failed\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n \"url\": \"/v1/charges?payment_intent=pi_NORMALIZED00000000000001\"\n },\n \"client_secret\": \"pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Upgrade to Zulip Cloud Standard, $80.0 x 6\",\n \"invoice\": null,\n \"last_payment_error\": {\n \"charge\": \"ch_NORMALIZED00000000000001\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_method\": {\n \"id\": \"pm_1OAbhhDEQaroqDjsHci1uPga\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"type\": \"card_error\"\n },\n \"latest_charge\": \"ch_NORMALIZED00000000000001\",\n \"livemode\": false,\n \"metadata\": {\n \"user_email\": \"[email protected]\",\n \"type\": \"upgrade\",\n \"billing_schedule\": \"1\",\n \"price_per_license\": \"8000\",\n \"realm_str\": \"zulip\",\n \"billing_modality\": \"charge_automatically\",\n \"seat_count\": \"6\",\n \"user_id\": \"10\",\n \"license_management\": \"automatic\",\n \"realm_id\": \"2\",\n \"licenses\": \"6\"\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_configuration_details\": null,\n \"payment_method_options\": {\n \"card\": {\n \"installments\": null,\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": \"[email protected]\",\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"source\": null,\n \"statement_descriptor\": \"Zulip Cloud Standard\",\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n \"payment_method\": {\n \"id\": \"pm_1OAbhhDEQaroqDjsHci1uPga\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"request_log_url\": \"https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1699549665\",\n \"type\": \"card_error\"\n }\n}\n",
+ "http_body": "{\n \"error\": {\n \"charge\": \"ch_NORMALIZED00000000000002\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_intent\": {\n \"id\": \"pi_NORMALIZED00000000000002\",\n \"object\": \"payment_intent\",\n \"amount\": 5000,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {\n }\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_NORMALIZED00000000000002\",\n \"object\": \"charge\",\n \"amount\": 5000,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": null,\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"ZULIP\",\n \"captured\": false,\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Payment for Invoice\",\n \"destination\": null,\n \"dispute\": null,\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": \"card_declined\",\n \"failure_message\": \"Your card was declined.\",\n \"fraud_details\": {\n },\n \"invoice\": \"in_NORMALIZED00000000000002\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\": null,\n \"order\": null,\n \"outcome\": {\n \"network_status\": \"declined_by_network\",\n \"reason\": \"generic_decline\",\n \"risk_level\": \"normal\",\n \"risk_score\": 6,\n \"seller_message\": \"The bank did not return any further details with this decline.\",\n \"type\": \"issuer_declined\"\n },\n \"paid\": false,\n \"payment_intent\": \"pi_NORMALIZED00000000000002\",\n \"payment_method\": \"pm_1OAbesDEQaroqDjs5R6CuXDC\",\n \"payment_method_details\": {\n \"card\": {\n \"amount_authorized\": null,\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"extended_authorization\": {\n \"status\": \"disabled\"\n },\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"incremental_authorization\": {\n \"status\": \"unavailable\"\n },\n \"installments\": null,\n \"last4\": \"0341\",\n \"mandate\": null,\n \"multicapture\": {\n \"status\": \"unavailable\"\n },\n \"network\": \"visa\",\n \"network_token\": {\n \"used\": false\n },\n \"overcapture\": {\n \"maximum_amount_capturable\": 5000,\n \"status\": \"unavailable\"\n },\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": \"[email protected]\",\n \"receipt_number\": null,\n \"receipt_url\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_NORMALIZED00000000000002/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"failed\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n \"url\": \"/v1/charges?payment_intent=pi_NORMALIZED00000000000002\"\n },\n \"client_secret\": \"pi_NORMALIZED00000000000002_secret_Xnfeb3bcGcLT0u7Y6t4QrBywl\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Payment for Invoice\",\n \"invoice\": \"in_NORMALIZED00000000000002\",\n \"last_payment_error\": {\n \"charge\": \"ch_NORMALIZED00000000000002\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_method\": {\n \"id\": \"pm_1OAbesDEQaroqDjs5R6CuXDC\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"type\": \"card_error\"\n },\n \"latest_charge\": \"ch_NORMALIZED00000000000002\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_configuration_details\": null,\n \"payment_method_options\": {\n \"card\": {\n \"installments\": null,\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n },\n \"cashapp\": {\n }\n },\n \"payment_method_types\": [\n \"card\",\n \"cashapp\"\n ],\n \"processing\": null,\n \"receipt_email\": \"[email protected]\",\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n \"payment_method\": {\n \"id\": \"pm_1OAbesDEQaroqDjs5R6CuXDC\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"request_log_url\": \"https://dashboard.stripe.com/test/logs/req_NORMALIZED0012?t=1699549490\",\n \"type\": \"card_error\"\n }\n}\n",
"http_status": 402,
"json_body": {
"error": {
@@ -374,7 +374,7 @@
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
"captured": false,
- "created": 1000000000,
+ "created": 1010000004,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -414,7 +414,7 @@
},
"paid": false,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "payment_method": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"payment_method_details": {
"card": {
"amount_authorized": null,
@@ -481,9 +481,9 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_35S0RwZGKlxPgcF3b7KQLi1YT",
"confirmation_method": "automatic",
- "created": 1000000000,
+ "created": 1010000005,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -534,9 +534,9 @@
},
"wallet": null
},
- "created": 1000000000,
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -626,15 +626,15 @@
},
"wallet": null
},
- "created": 1000000000,
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "id": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1699549665",
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1700300024",
"type": "card_error"
}
},
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.create.1.json
similarity index 71%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.retrieve.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.create.1.json
index f456ceb1345..01a363b7eb8 100644
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcWDEQaroqDjsMCHTAw0x_secret_OyYkEf6WNCBG2qkcM9lqdKLG96dBJrV",
- "created": 1000000000,
+ "client_secret": "seti_1ODkuHDEQaroqDjsOK9izlqp_secret_P1oXIwopESgbGd5kCDpJAckrMODQ4PZ",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcWDEQaroqDjsMCHTAw0x",
+ "id": "seti_1ODkuHDEQaroqDjsOK9izlqp",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbcWDEQaroqDjs5g1r0nKs",
+ "latest_attempt": "setatt_1ODkuHDEQaroqDjsqIuiHGr1",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcWDEQaroqDjsRGPmvEws",
+ "payment_method": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.list.1.json
similarity index 84%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.list.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.list.1.json
index 17f300f2908..4b6837bbbbc 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbhfDEQaroqDjstzEZ6SMo_secret_OyYprMvO3cUMoijhAUJZ72v0OIeyUix",
- "created": 1000000000,
+ "client_secret": "seti_1ODkuFDEQaroqDjsSRvNjlQ9_secret_P1oXEVffOtfoUES7GlWnfjfLMZP5GE9",
+ "created": 1010000006,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbhfDEQaroqDjstzEZ6SMo",
+ "id": "seti_1ODkuFDEQaroqDjsSRvNjlQ9",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.retrieve.1.json
similarity index 71%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.create.2.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.retrieve.1.json
index 27d28c5c809..01a363b7eb8 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.create.2.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbhRDEQaroqDjsp999cQmx_secret_OyYpwymNNbOGX7YwjAIVH1zBLPnSkyR",
- "created": 1000000000,
+ "client_secret": "seti_1ODkuHDEQaroqDjsOK9izlqp_secret_P1oXIwopESgbGd5kCDpJAckrMODQ4PZ",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbhRDEQaroqDjsp999cQmx",
+ "id": "seti_1ODkuHDEQaroqDjsOK9izlqp",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbhRDEQaroqDjsUuquiZSa",
+ "latest_attempt": "setatt_1ODkuHDEQaroqDjsqIuiHGr1",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
+ "payment_method": "pm_1ODkuHDEQaroqDjsOkC5GftU",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--checkout.Session.create.1.json
similarity index 76%
rename from corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--checkout.Session.create.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--checkout.Session.create.1.json
index b3c4c724411..162ff3e7496 100644
--- a/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000006,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED01x06yx1XVGF7NxK6niZSjvB6ndOQg2HUaMqfC1TwKixtPRz",
+ "id": "cs_test_NORMALIZED01gBNk8qlvLnUF2wU2P23l2TVhtqIIKl0cHiUiQIMRIC7jgL",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbfDDEQaroqDjs5IVz2ctz",
+ "setup_intent": "seti_1ODkuFDEQaroqDjsSRvNjlQ9",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01x06yx1XVGF7NxK6niZSjvB6ndOQg2HUaMqfC1TwKixtPRz#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01gBNk8qlvLnUF2wU2P23l2TVhtqIIKl0cHiUiQIMRIC7jgL#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--checkout.Session.list.1.json
similarity index 77%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.list.1.json
rename to corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--checkout.Session.list.1.json
index ab8fa9c886a..e39c4eed5f3 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/card_attached_to_customer_but_payment_fails--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000006,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED025cWOFWXZpmKGlNbOsbmzAEUKQKEeHPGMPdJ09UoZ6ODd20",
+ "id": "cs_test_NORMALIZED01gBNk8qlvLnUF2wU2P23l2TVhtqIIKl0cHiUiQIMRIC7jgL",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbhfDEQaroqDjstzEZ6SMo",
+ "setup_intent": "seti_1ODkuFDEQaroqDjsSRvNjlQ9",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED025cWOFWXZpmKGlNbOsbmzAEUKQKEeHPGMPdJ09UoZ6ODd20#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01gBNk8qlvLnUF2wU2P23l2TVhtqIIKl0cHiUiQIMRIC7jgL#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.create.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.create.1.json
similarity index 96%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.create.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.create.1.json
index 593a07ed0c8..c9219e149c0 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.create.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"default_currency": null,
"default_source": null,
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.1.json
new file mode 100644
index 00000000000..fdd3b5ea4e6
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.1.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZY4DEQaroqDjst3BklA3q",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.2.json
new file mode 100644
index 00000000000..1f6c85cc1f2
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.2.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZY8DEQaroqDjs9CrZJasJ",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.3.json
new file mode 100644
index 00000000000..358f0955b82
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.3.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYCDEQaroqDjsrpUcYFid",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.4.json
new file mode 100644
index 00000000000..65fff3c298e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.4.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYGDEQaroqDjsm4ouIeUW",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.5.json
new file mode 100644
index 00000000000..7b85d7ec12d
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.5.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYKDEQaroqDjsker9EuiP",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.6.json
new file mode 100644
index 00000000000..226e87a03e7
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.6.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYODEQaroqDjsqrgagvFr",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.7.json
new file mode 100644
index 00000000000..a4a3b41dc2b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.7.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYSDEQaroqDjs0mTTiBeD",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.8.json
new file mode 100644
index 00000000000..44f6cd02fa1
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.8.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYWDEQaroqDjslD4xcPaQ",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.9.json
new file mode 100644
index 00000000000..11311644a42
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.modify.9.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZYZDEQaroqDjsVOcw9c5t",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.1.json
new file mode 100644
index 00000000000..724570b3624
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZY4DEQaroqDjst3BklA3q",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.10.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.10.json
new file mode 100644
index 00000000000..2ab6be270cb
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.10.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYKDEQaroqDjsker9EuiP",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.11.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.11.json
new file mode 100644
index 00000000000..312e3679eac
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.11.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000004,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYODEQaroqDjsqrgagvFr",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.12.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.12.json
new file mode 100644
index 00000000000..312e3679eac
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.12.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000004,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYODEQaroqDjsqrgagvFr",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.13.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.13.json
new file mode 100644
index 00000000000..89d71fb1718
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.13.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000005,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYSDEQaroqDjs0mTTiBeD",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.14.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.14.json
new file mode 100644
index 00000000000..89d71fb1718
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.14.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000005,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYSDEQaroqDjs0mTTiBeD",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.15.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.15.json
new file mode 100644
index 00000000000..eceb3eafd26
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.15.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000006,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYWDEQaroqDjslD4xcPaQ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.16.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.16.json
new file mode 100644
index 00000000000..eceb3eafd26
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.16.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000006,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYWDEQaroqDjslD4xcPaQ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.17.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.17.json
new file mode 100644
index 00000000000..c9dcb4b43ac
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.17.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000007,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYZDEQaroqDjsVOcw9c5t",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.18.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.18.json
new file mode 100644
index 00000000000..c9dcb4b43ac
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.18.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000007,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYZDEQaroqDjsVOcw9c5t",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.2.json
new file mode 100644
index 00000000000..724570b3624
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZY4DEQaroqDjst3BklA3q",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.3.json
new file mode 100644
index 00000000000..cc5eb5b0dd2
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000008,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZY8DEQaroqDjs9CrZJasJ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.4.json
new file mode 100644
index 00000000000..cc5eb5b0dd2
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000008,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZY8DEQaroqDjs9CrZJasJ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.5.json
new file mode 100644
index 00000000000..ecac7681bf3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000009,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYCDEQaroqDjsrpUcYFid",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.6.json
new file mode 100644
index 00000000000..ecac7681bf3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000009,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYCDEQaroqDjsrpUcYFid",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.7.json
new file mode 100644
index 00000000000..c5ab03db21e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.7.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000010,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYGDEQaroqDjsm4ouIeUW",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.8.json
new file mode 100644
index 00000000000..c5ab03db21e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.8.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000010,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYGDEQaroqDjsm4ouIeUW",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.9.json
new file mode 100644
index 00000000000..2ab6be270cb
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Customer.retrieve.9.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYKDEQaroqDjsker9EuiP",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.1.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.1.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.2.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.2.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.2.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.3.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.3.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.3.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.4.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.4.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.5.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.2.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.5.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.6.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.3.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.6.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.7.json
similarity index 67%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.7.json
index 3190cda6f9c..e39960ab725 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.list.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.7.json
@@ -2,5 +2,5 @@
"data": [],
"has_more": false,
"object": "list",
- "url": "/v1/invoiceitems"
+ "url": "/v1/invoices"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.8.json
similarity index 67%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.8.json
index 3190cda6f9c..e39960ab725 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.list.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.8.json
@@ -2,5 +2,5 @@
"data": [],
"has_more": false,
"object": "list",
- "url": "/v1/invoiceitems"
+ "url": "/v1/invoices"
}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.9.json
new file mode 100644
index 00000000000..e39960ab725
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--Invoice.list.9.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/invoices"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.1.json
new file mode 100644
index 00000000000..20586b94448
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.1.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZY4DEQaroqDjsXYmi1Qaj_secret_P1cn3z8wxg4dX4OELSWmMKqwQmAbqti",
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZY4DEQaroqDjsXYmi1Qaj",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZY4DEQaroqDjs9bTJ69Fw",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZY4DEQaroqDjst3BklA3q",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.2.json
new file mode 100644
index 00000000000..6b056d0b3b1
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.2.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZY8DEQaroqDjszUtjYi7t_secret_P1cnsrJUa85dR45UVG4YczkGGU2jD84",
+ "created": 1010000008,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZY8DEQaroqDjszUtjYi7t",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZY8DEQaroqDjs6nlaBds3",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZY8DEQaroqDjs9CrZJasJ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.3.json
new file mode 100644
index 00000000000..4c06c1f52c9
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.3.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYCDEQaroqDjsyActamSC_secret_P1cnBE9OuP3zQA2dIlpnLyAvlgXKjnj",
+ "created": 1010000009,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYCDEQaroqDjsyActamSC",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYCDEQaroqDjsP7YDUY4y",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYCDEQaroqDjsrpUcYFid",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.4.json
new file mode 100644
index 00000000000..8543cbfd3cd
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.4.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYGDEQaroqDjsNNKZbOe1_secret_P1cnDV8ISpom4gTaKN6nHYm7NeC26mO",
+ "created": 1010000010,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYGDEQaroqDjsNNKZbOe1",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYGDEQaroqDjsGtEsKAIx",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYGDEQaroqDjsm4ouIeUW",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.5.json
new file mode 100644
index 00000000000..6ea487f0774
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.5.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYKDEQaroqDjsrmWSqBvu_secret_P1cnVrRhlrryeRrOzG5V7AXf8cJNM2s",
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYKDEQaroqDjsrmWSqBvu",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYKDEQaroqDjstrL2e5ru",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYKDEQaroqDjsker9EuiP",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.6.json
new file mode 100644
index 00000000000..1b2ec91d69d
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.6.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYODEQaroqDjsqAYF1Jkt_secret_P1cowfDCI5yXF0AxRsYd5YlH58wTleP",
+ "created": 1010000004,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYODEQaroqDjsqAYF1Jkt",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYODEQaroqDjs5611YA19",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYODEQaroqDjsqrgagvFr",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.7.json
new file mode 100644
index 00000000000..da9a11c508a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.7.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYSDEQaroqDjsA51Xnf3B_secret_P1coJgBpFuO0oa8xWyHNnK4ciy67v8v",
+ "created": 1010000005,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYSDEQaroqDjsA51Xnf3B",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYSDEQaroqDjs8brayQcK",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYSDEQaroqDjs0mTTiBeD",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.8.json
new file mode 100644
index 00000000000..c68ed0c8b33
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.8.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYWDEQaroqDjsVePXf39L_secret_P1coztaPJiCsCDBcfyHLllYTBGKsW2a",
+ "created": 1010000006,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYWDEQaroqDjsVePXf39L",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYWDEQaroqDjst7Lleiwd",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYWDEQaroqDjslD4xcPaQ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.9.json
new file mode 100644
index 00000000000..22b5ac30be2
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.create.9.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYZDEQaroqDjsyZJ5XVCY_secret_P1coKKXmg0cN0eN7I2QwjbC8m4kQ1tJ",
+ "created": 1010000007,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYZDEQaroqDjsyZJ5XVCY",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYZDEQaroqDjsGpyawhR4",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYZDEQaroqDjsVOcw9c5t",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.1.json
similarity index 84%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.1.json
index 7cb57459cf6..99616feb1e5 100644
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcVDEQaroqDjsMe4Bk8pK_secret_OyYjyh7ux5EizgjI4PYWAQUmOgh76OG",
- "created": 1000000000,
+ "client_secret": "seti_1ODZY4DEQaroqDjsljiXOaej_secret_P1cnK4wVOlnnUfmT9Pqx56DX4n0sevm",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcVDEQaroqDjsMe4Bk8pK",
+ "id": "seti_1ODZY4DEQaroqDjsljiXOaej",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.2.json
similarity index 84%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.2.json
index 065a55ff59d..25f982a226a 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.2.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbhEDEQaroqDjsQE4VSJWD_secret_OyYok62x0mvTGBOwF3o7TXqizRAMBov",
- "created": 1000000000,
+ "client_secret": "seti_1ODZY8DEQaroqDjsjrWAY2dl_secret_P1cnLTCYC2s5AwQDmPh6fRRBCgj3Dlv",
+ "created": 1010000008,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbhEDEQaroqDjsQE4VSJWD",
+ "id": "seti_1ODZY8DEQaroqDjsjrWAY2dl",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.3.json
new file mode 100644
index 00000000000..487172452b8
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.3.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYCDEQaroqDjs9ByjohCj_secret_P1cnsla9oLoUNpKT1Xo22J024hNBz8z",
+ "created": 1010000009,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYCDEQaroqDjs9ByjohCj",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.4.json
new file mode 100644
index 00000000000..be171bde256
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.4.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYFDEQaroqDjscgjzVl2q_secret_P1cnCVxOVZVVlTqDDSdhiediPuPdn84",
+ "created": 1010000011,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYFDEQaroqDjscgjzVl2q",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.5.json
new file mode 100644
index 00000000000..5130e1bbb63
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.5.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYJDEQaroqDjsL8HomuFP_secret_P1cnT0vLMypYCeoioyi8Y6ZNTya78bI",
+ "created": 1010000012,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYJDEQaroqDjsL8HomuFP",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.6.json
new file mode 100644
index 00000000000..7a429b812d6
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.6.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYNDEQaroqDjsoKLPIVXp_secret_P1cnVbwRb4PVlTGilI5AFnhfpIgZJXD",
+ "created": 1010000013,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYNDEQaroqDjsoKLPIVXp",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.7.json
new file mode 100644
index 00000000000..003a0cd348e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.7.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYRDEQaroqDjsA9oIrupK_secret_P1coUnyjSL9AhvM3BpPushZslsSJMnh",
+ "created": 1010000014,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYRDEQaroqDjsA9oIrupK",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.8.json
new file mode 100644
index 00000000000..1767aa15288
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.8.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYVDEQaroqDjsvzRTeAco_secret_P1coWZpzhPeiBcgHGP8mw2M35UA5Tkr",
+ "created": 1010000015,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYVDEQaroqDjsvzRTeAco",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.9.json
new file mode 100644
index 00000000000..96fb486feae
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.list.9.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYZDEQaroqDjsDxiuWKvW_secret_P1coEMoVYpSu05fnxxMTSOMDjS3nUC7",
+ "created": 1010000007,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYZDEQaroqDjsDxiuWKvW",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.1.json
new file mode 100644
index 00000000000..20586b94448
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.1.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZY4DEQaroqDjsXYmi1Qaj_secret_P1cn3z8wxg4dX4OELSWmMKqwQmAbqti",
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZY4DEQaroqDjsXYmi1Qaj",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZY4DEQaroqDjs9bTJ69Fw",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZY4DEQaroqDjst3BklA3q",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.2.json
new file mode 100644
index 00000000000..6b056d0b3b1
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.2.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZY8DEQaroqDjszUtjYi7t_secret_P1cnsrJUa85dR45UVG4YczkGGU2jD84",
+ "created": 1010000008,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZY8DEQaroqDjszUtjYi7t",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZY8DEQaroqDjs6nlaBds3",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZY8DEQaroqDjs9CrZJasJ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.3.json
new file mode 100644
index 00000000000..4c06c1f52c9
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.3.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYCDEQaroqDjsyActamSC_secret_P1cnBE9OuP3zQA2dIlpnLyAvlgXKjnj",
+ "created": 1010000009,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYCDEQaroqDjsyActamSC",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYCDEQaroqDjsP7YDUY4y",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYCDEQaroqDjsrpUcYFid",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.4.json
new file mode 100644
index 00000000000..8543cbfd3cd
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.4.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYGDEQaroqDjsNNKZbOe1_secret_P1cnDV8ISpom4gTaKN6nHYm7NeC26mO",
+ "created": 1010000010,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYGDEQaroqDjsNNKZbOe1",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYGDEQaroqDjsGtEsKAIx",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYGDEQaroqDjsm4ouIeUW",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.5.json
new file mode 100644
index 00000000000..6ea487f0774
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.5.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYKDEQaroqDjsrmWSqBvu_secret_P1cnVrRhlrryeRrOzG5V7AXf8cJNM2s",
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYKDEQaroqDjsrmWSqBvu",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYKDEQaroqDjstrL2e5ru",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYKDEQaroqDjsker9EuiP",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.6.json
new file mode 100644
index 00000000000..1b2ec91d69d
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.6.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYODEQaroqDjsqAYF1Jkt_secret_P1cowfDCI5yXF0AxRsYd5YlH58wTleP",
+ "created": 1010000004,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYODEQaroqDjsqAYF1Jkt",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYODEQaroqDjs5611YA19",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYODEQaroqDjsqrgagvFr",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.7.json
new file mode 100644
index 00000000000..da9a11c508a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.7.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYSDEQaroqDjsA51Xnf3B_secret_P1coJgBpFuO0oa8xWyHNnK4ciy67v8v",
+ "created": 1010000005,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYSDEQaroqDjsA51Xnf3B",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYSDEQaroqDjs8brayQcK",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYSDEQaroqDjs0mTTiBeD",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.8.json
new file mode 100644
index 00000000000..c68ed0c8b33
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.8.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYWDEQaroqDjsVePXf39L_secret_P1coztaPJiCsCDBcfyHLllYTBGKsW2a",
+ "created": 1010000006,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYWDEQaroqDjsVePXf39L",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYWDEQaroqDjst7Lleiwd",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYWDEQaroqDjslD4xcPaQ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.9.json
new file mode 100644
index 00000000000..22b5ac30be2
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--SetupIntent.retrieve.9.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZYZDEQaroqDjsyZJ5XVCY_secret_P1coKKXmg0cN0eN7I2QwjbC8m4kQ1tJ",
+ "created": 1010000007,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZYZDEQaroqDjsyZJ5XVCY",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZYZDEQaroqDjsGpyawhR4",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZYZDEQaroqDjsVOcw9c5t",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.1.json
similarity index 73%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.create.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.1.json
index 5b73e55f756..1c0abf32f85 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02cBWru1UzudDAYcuIVD7bQsG82m7jRjDI4IyHK7jQSTfTTA",
+ "id": "cs_test_NORMALIZED01SkQAe3x7Uak5FrYnunwdIKHCOx8YrVo5vbArfpfr2kzVPm",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbhEDEQaroqDjsQE4VSJWD",
+ "setup_intent": "seti_1ODZY4DEQaroqDjsljiXOaej",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02cBWru1UzudDAYcuIVD7bQsG82m7jRjDI4IyHK7jQSTfTTA#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01SkQAe3x7Uak5FrYnunwdIKHCOx8YrVo5vbArfpfr2kzVPm#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.2.json
similarity index 76%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--checkout.Session.create.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.2.json
index 4db211fcf29..6889e1f6488 100644
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.2.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000008,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02Spt9G7wgeGJXCSbSTvoZFWYllI78YkbM06v4SsVGKcv5Tm",
+ "id": "cs_test_NORMALIZED02syFoTZ4XspUpQUHtErrZDLM4NpG73dSyWV1g09Z1fE3c6N",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbcVDEQaroqDjsMe4Bk8pK",
+ "setup_intent": "seti_1ODZY8DEQaroqDjsjrWAY2dl",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02Spt9G7wgeGJXCSbSTvoZFWYllI78YkbM06v4SsVGKcv5Tm#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02syFoTZ4XspUpQUHtErrZDLM4NpG73dSyWV1g09Z1fE3c6N#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.create.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.3.json
similarity index 76%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.create.2.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.3.json
index 7b91db3ad7e..c2c1a0edbf1 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.create.2.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.3.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000009,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03Swjq9aLXvDIN3mixflJudqZRONOchkArvt7cRWGUq0C7Um",
+ "id": "cs_test_NORMALIZED03rSuEwQYKSdh1jOlU7bxRD4nl97Oi9etvpLVNTaiksNm2XO",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbhtDEQaroqDjsBMYqM1fx",
+ "setup_intent": "seti_1ODZYCDEQaroqDjs9ByjohCj",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03Swjq9aLXvDIN3mixflJudqZRONOchkArvt7cRWGUq0C7Um#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03rSuEwQYKSdh1jOlU7bxRD4nl97Oi9etvpLVNTaiksNm2XO#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.4.json
new file mode 100644
index 00000000000..3745d39f5f3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.4.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000011,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED04JZQ2ORZWSvnQ6gRZKUqYZpXHzmzlz4u9qOJrURjlpMIFBe",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYFDEQaroqDjscgjzVl2q",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED04JZQ2ORZWSvnQ6gRZKUqYZpXHzmzlz4u9qOJrURjlpMIFBe#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.5.json
new file mode 100644
index 00000000000..84112cdd60d
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.5.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000003,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED05LGzvl5NOH85UbOcoI1wmjvTUcDvGv67xoUaUMTk0mzLfFR",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYJDEQaroqDjsL8HomuFP",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED05LGzvl5NOH85UbOcoI1wmjvTUcDvGv67xoUaUMTk0mzLfFR#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.6.json
new file mode 100644
index 00000000000..5d1bdde1624
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.6.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000013,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED06x7aMolOCEnVEbGosnYF8QylrlShlCmqdZssmacVQ0zu0cR",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYNDEQaroqDjsoKLPIVXp",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED06x7aMolOCEnVEbGosnYF8QylrlShlCmqdZssmacVQ0zu0cR#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.7.json
new file mode 100644
index 00000000000..52d8e29171a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.7.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000014,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED079hpoIG2yf8TI7HLg0cIyNA41BuizwP0tbZnIc2lCaKnEaC",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYRDEQaroqDjsA9oIrupK",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED079hpoIG2yf8TI7HLg0cIyNA41BuizwP0tbZnIc2lCaKnEaC#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.8.json
new file mode 100644
index 00000000000..948eaa35d67
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.8.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000015,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED08uHoWaY2xL0oCaKjEaQmNyNU5vU4EMaVnBRidNlv02wbmTH",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYVDEQaroqDjsvzRTeAco",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED08uHoWaY2xL0oCaKjEaQmNyNU5vU4EMaVnBRidNlv02wbmTH#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.9.json
new file mode 100644
index 00000000000..1ebd8b1efc0
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.create.9.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000007,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED09YQJYy5tnNgWeWU8Aun5OIkM4Th1WEAWYL8cKNsb1BCDaOr",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYZDEQaroqDjsDxiuWKvW",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED09YQJYy5tnNgWeWU8Aun5OIkM4Th1WEAWYL8cKNsb1BCDaOr#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.1.json
similarity index 77%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--checkout.Session.list.1.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.1.json
index b849a93148a..08ebedd2c8c 100644
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02Spt9G7wgeGJXCSbSTvoZFWYllI78YkbM06v4SsVGKcv5Tm",
+ "id": "cs_test_NORMALIZED01SkQAe3x7Uak5FrYnunwdIKHCOx8YrVo5vbArfpfr2kzVPm",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbcVDEQaroqDjsMe4Bk8pK",
+ "setup_intent": "seti_1ODZY4DEQaroqDjsljiXOaej",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02Spt9G7wgeGJXCSbSTvoZFWYllI78YkbM06v4SsVGKcv5Tm#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01SkQAe3x7Uak5FrYnunwdIKHCOx8YrVo5vbArfpfr2kzVPm#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.list.2.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.2.json
similarity index 77%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.list.2.json
rename to corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.2.json
index f661f35e0da..608eba889c3 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.list.2.json
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.2.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000008,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03Swjq9aLXvDIN3mixflJudqZRONOchkArvt7cRWGUq0C7Um",
+ "id": "cs_test_NORMALIZED02syFoTZ4XspUpQUHtErrZDLM4NpG73dSyWV1g09Z1fE3c6N",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbhtDEQaroqDjsBMYqM1fx",
+ "setup_intent": "seti_1ODZY8DEQaroqDjsjrWAY2dl",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03Swjq9aLXvDIN3mixflJudqZRONOchkArvt7cRWGUq0C7Um#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02syFoTZ4XspUpQUHtErrZDLM4NpG73dSyWV1g09Z1fE3c6N#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.3.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.3.json
new file mode 100644
index 00000000000..dd484e93573
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.3.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000009,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED03rSuEwQYKSdh1jOlU7bxRD4nl97Oi9etvpLVNTaiksNm2XO",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYCDEQaroqDjs9ByjohCj",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03rSuEwQYKSdh1jOlU7bxRD4nl97Oi9etvpLVNTaiksNm2XO#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.4.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.4.json
new file mode 100644
index 00000000000..b98ca749cdd
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.4.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000011,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED04JZQ2ORZWSvnQ6gRZKUqYZpXHzmzlz4u9qOJrURjlpMIFBe",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYFDEQaroqDjscgjzVl2q",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED04JZQ2ORZWSvnQ6gRZKUqYZpXHzmzlz4u9qOJrURjlpMIFBe#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.5.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.5.json
new file mode 100644
index 00000000000..f9188f36c5a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.5.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000003,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED05LGzvl5NOH85UbOcoI1wmjvTUcDvGv67xoUaUMTk0mzLfFR",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYJDEQaroqDjsL8HomuFP",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED05LGzvl5NOH85UbOcoI1wmjvTUcDvGv67xoUaUMTk0mzLfFR#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.6.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.6.json
new file mode 100644
index 00000000000..20fd878ed15
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.6.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000013,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED06x7aMolOCEnVEbGosnYF8QylrlShlCmqdZssmacVQ0zu0cR",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYNDEQaroqDjsoKLPIVXp",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED06x7aMolOCEnVEbGosnYF8QylrlShlCmqdZssmacVQ0zu0cR#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.7.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.7.json
new file mode 100644
index 00000000000..834d4906ccd
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.7.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000014,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED079hpoIG2yf8TI7HLg0cIyNA41BuizwP0tbZnIc2lCaKnEaC",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYRDEQaroqDjsA9oIrupK",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED079hpoIG2yf8TI7HLg0cIyNA41BuizwP0tbZnIc2lCaKnEaC#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.8.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.8.json
new file mode 100644
index 00000000000..372f6abe1f2
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.8.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000015,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED08uHoWaY2xL0oCaKjEaQmNyNU5vU4EMaVnBRidNlv02wbmTH",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYVDEQaroqDjsvzRTeAco",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED08uHoWaY2xL0oCaKjEaQmNyNU5vU4EMaVnBRidNlv02wbmTH#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.9.json b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.9.json
new file mode 100644
index 00000000000..d2a71166286
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/check_upgrade_parameters--checkout.Session.list.9.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000007,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED09YQJYy5tnNgWeWU8Aun5OIkM4Th1WEAWYL8cKNsb1BCDaOr",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZYZDEQaroqDjsDxiuWKvW",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED09YQJYy5tnNgWeWU8Aun5OIkM4Th1WEAWYL8cKNsb1BCDaOr#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.2.json b/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.2.json
deleted file mode 100644
index 01a86cd5f9f..00000000000
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.2.json
+++ /dev/null
@@ -1,1496 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_JlEWumvH28V1qfotsPkUplS4r",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbcVDEQaroqDjs0KfdEqIN",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "56bd6a3a-0ffe-4d5c-8f17-85d326c0ae9c"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 5172,
- "amount_paid": 5172,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000001",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0003",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhTUVRMVE8wZ1FkcVREWXZGaXNlUEdFVnl6cDBELDkwMDkwMTM50200gYZHWnSh?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhTUVRMVE8wZ1FkcVREWXZGaXNlUEdFVnl6cDBELDkwMDkwMTM50200gYZHWnSh/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 5172,
- "amount_excluding_tax": 5172,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1362193445,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 1293,
- "unit_amount_decimal": "1293"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 4,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "1293"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 5172,
- "subtotal_excluding_tax": 5172,
- "tax": null,
- "test_clock": null,
- "total": 5172,
- "total_discount_amounts": [],
- "total_excluding_tax": 5172,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "amount_paid": 0,
- "amount_remaining": 5172,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "charge": null,
- "next_payment_attempt": 1000000000,
- "paid": false,
- "status": "open",
- "status_transitions": {
- "paid_at": null
- }
- }
- },
- "id": "evt_1OAbcVDEQaroqDjs03T9A2OB",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 36830,
- "amount_paid": 36830,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000002",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0004",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVWUh5RHcwWTRkMk5rS2FsUXJHMEw5THJwWFlwLDkwMDkwMTM40200t4N8c77L?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVWUh5RHcwWTRkMk5rS2FsUXJHMEw5THJwWFlwLDkwMDkwMTM40200t4N8c77L/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 36830,
- "amount_excluding_tax": 36830,
- "currency": "usd",
- "description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1359774245,
- "start": 1330657445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 7366,
- "unit_amount_decimal": "7366"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 5,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "7366"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 36830,
- "subtotal_excluding_tax": 36830,
- "tax": null,
- "test_clock": null,
- "total": 36830,
- "total_discount_amounts": [],
- "total_excluding_tax": 36830,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcUDEQaroqDjsyzwmQloZ",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 36830,
- "amount_paid": 36830,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000002",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0004",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVWUh5RHcwWTRkMk5rS2FsUXJHMEw5THJwWFlwLDkwMDkwMTM40200t4N8c77L?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVWUh5RHcwWTRkMk5rS2FsUXJHMEw5THJwWFlwLDkwMDkwMTM40200t4N8c77L/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 36830,
- "amount_excluding_tax": 36830,
- "currency": "usd",
- "description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1359774245,
- "start": 1330657445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 7366,
- "unit_amount_decimal": "7366"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 5,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "7366"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 36830,
- "subtotal_excluding_tax": 36830,
- "tax": null,
- "test_clock": null,
- "total": 36830,
- "total_discount_amounts": [],
- "total_excluding_tax": 36830,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcUDEQaroqDjsEgFrMjIG",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 36830,
- "amount_paid": 36830,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000002",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0004",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVWUh5RHcwWTRkMk5rS2FsUXJHMEw5THJwWFlwLDkwMDkwMTM40200t4N8c77L?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVWUh5RHcwWTRkMk5rS2FsUXJHMEw5THJwWFlwLDkwMDkwMTM40200t4N8c77L/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 36830,
- "amount_excluding_tax": 36830,
- "currency": "usd",
- "description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1359774245,
- "start": 1330657445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 7366,
- "unit_amount_decimal": "7366"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 5,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "7366"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 36830,
- "subtotal_excluding_tax": 36830,
- "tax": null,
- "test_clock": null,
- "total": 36830,
- "total_discount_amounts": [],
- "total_excluding_tax": 36830,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "amount_paid": 0,
- "amount_remaining": 36830,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "charge": null,
- "next_payment_attempt": 1000000000,
- "paid": false,
- "status": "open",
- "status_transitions": {
- "paid_at": null
- }
- }
- },
- "id": "evt_1OAbcUDEQaroqDjsDjTSh4YD",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 5172,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 5172,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 5172,
- "amount_captured": 5172,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0003",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": "in_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAaNVDEQaroqDjsKz9WBlqm",
- "payment_method_details": {
- "card": {
- "amount_authorized": 5172,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 5172,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJqhtKoGMgbxNuD_HdA6LBbiqvd3CgWa3vp3ZhutzEwR0ArR-M_53l2gybDcVj_jxHBTBMK2Qf_XwEII?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_UzBYTr0eoTBWYFgYJXZ33Ke3Z",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0003",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000002",
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAaNVDEQaroqDjsKz9WBlqm",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- },
- "cashapp": {}
- },
- "payment_method_types": [
- "card",
- "cashapp"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaNnDEQaroqDjs1zQFBn6G",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000002-initial_attempt-4ed2996c450bc9d5b"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 5172,
- "amount_captured": 5172,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0003",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": "in_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAaNVDEQaroqDjsKz9WBlqm",
- "payment_method_details": {
- "card": {
- "amount_authorized": 5172,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 5172,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJqhtKoGMgZNulPtQYk6LBZrXTUGFqnV-FqfJa6TXLx8bB3EpriaNZfWo2kivX1Qvw_eTUHTdhDwZiWg?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaNnDEQaroqDjs14T9KR67",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000002-initial_attempt-4ed2996c450bc9d5b"
- },
- "type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbcUDEQaroqDjsAQh8fwuv",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "fef9d024-8d71-46e0-9e25-0ab91eed48b9"
- },
- "type": "customer.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 36830,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 36830,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 36830,
- "amount_captured": 36830,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000002",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0004",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_method": "pm_1OAaPKDEQaroqDjs9sjCULZ4",
- "payment_method_details": {
- "card": {
- "amount_authorized": 36830,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 36830,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJqhtKoGMgYKhAZt1AM6LBY5O-JfXeLVQbXY5RcX7_ft-xVubz2Om89rEEFvf9M0eWXeXfsTppCr9x0N?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000003"
- },
- "client_secret": "pi_NORMALIZED00000000000003_secret_N7gFQ9B32kFzzxIFNzLcO13Of",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0004",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000003",
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAaPKDEQaroqDjs9sjCULZ4",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- },
- "cashapp": {}
- },
- "payment_method_types": [
- "card",
- "cashapp"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaPhDEQaroqDjs1CkiZH5S",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000003-initial_attempt-91513f24b3da28d49"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 36830,
- "amount_captured": 36830,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000002",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0004",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_method": "pm_1OAaPKDEQaroqDjs9sjCULZ4",
- "payment_method_details": {
- "card": {
- "amount_authorized": 36830,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 36830,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJqhtKoGMgaN3fY1XIg6LBZe-OMuDSSUiPc6CWrJyMzvG7D6Qrj2_IwA2JiIOD73s1ifU89hqxIBYj6S?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaPhDEQaroqDjs1Cp7F6f0",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000003-initial_attempt-91513f24b3da28d49"
- },
- "type": "charge.succeeded"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.3.json b/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.3.json
deleted file mode 100644
index 7cad473fbd3..00000000000
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.3.json
+++ /dev/null
@@ -1,1239 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 240000,
- "amount_paid": 240000,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000003",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0004",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVMkZ3OVg2VlZhNk5YMXFjbHpqZmdoRGdOZEZYLDkwMDkwMTQw0200aY6y11lU?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVMkZ3OVg2VlZhNk5YMXFjbHpqZmdoRGdOZEZYLDkwMDkwMTQw0200aY6y11lU/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 240000,
- "amount_excluding_tax": 240000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 30,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 240000,
- "subtotal_excluding_tax": 240000,
- "tax": null,
- "test_clock": null,
- "total": 240000,
- "total_discount_amounts": [],
- "total_excluding_tax": 240000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcWDEQaroqDjsKJeJaJEB",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcWDEQaroqDjsMCHTAw0x_secret_OyYkEf6WNCBG2qkcM9lqdKLG96dBJrV",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcWDEQaroqDjsMCHTAw0x",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbcWDEQaroqDjs5g1r0nKs",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcWDEQaroqDjsRGPmvEws",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcXDEQaroqDjsZb6fqG2g",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "91491e6f-6834-4bc8-966e-d25753bd03f7"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbcWDEQaroqDjsRGPmvEws",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbcXDEQaroqDjsLN6I0Sx1",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "91491e6f-6834-4bc8-966e-d25753bd03f7"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 240000,
- "amount_paid": 240000,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000003",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0004",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVMkZ3OVg2VlZhNk5YMXFjbHpqZmdoRGdOZEZYLDkwMDkwMTQw0200aY6y11lU?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVMkZ3OVg2VlZhNk5YMXFjbHpqZmdoRGdOZEZYLDkwMDkwMTQw0200aY6y11lU/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 240000,
- "amount_excluding_tax": 240000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 30,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 240000,
- "subtotal_excluding_tax": 240000,
- "tax": null,
- "test_clock": null,
- "total": 240000,
- "total_discount_amounts": [],
- "total_excluding_tax": 240000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "amount_paid": 0,
- "amount_remaining": 240000,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "charge": null,
- "next_payment_attempt": 1000000000,
- "paid": false,
- "status": "open",
- "status_transitions": {
- "paid_at": null
- }
- }
- },
- "id": "evt_1OAbcWDEQaroqDjsjGqglMBc",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 240000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 240000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 240000,
- "amount_captured": 240000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000003",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0004",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000004",
- "payment_method": "pm_1OAaPKDEQaroqDjs9sjCULZ4",
- "payment_method_details": {
- "card": {
- "amount_authorized": 240000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 240000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJyhtKoGMgZak4F2QcM6LBbQ86CfoMhvDQ7ao4AtY-UYuDivSeil4UI5shiBA5PkfFpo4j85tc0qlimN?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000003/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000004"
- },
- "client_secret": "pi_NORMALIZED00000000000004_secret_avJbcuvTMyyghg75c3FmUAehm",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0004",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000004",
- "invoice": "in_NORMALIZED00000000000004",
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAaPKDEQaroqDjs9sjCULZ4",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- },
- "cashapp": {}
- },
- "payment_method_types": [
- "card",
- "cashapp"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaPkDEQaroqDjs1X7WPQH6",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000004-initial_attempt-88766bb2913cfc739"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 240000,
- "amount_captured": 240000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000003",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0004",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000004",
- "payment_method": "pm_1OAaPKDEQaroqDjs9sjCULZ4",
- "payment_method_details": {
- "card": {
- "amount_authorized": 240000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 240000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJyhtKoGMgZT_jjONV06LBZYOfWL7uQbrc5ICgOmbXm9r6jEzXJhkOXUeqgesuJExG6X4jDApJa2PMNn?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000003/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaPkDEQaroqDjs1KIivvQk",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000004-initial_attempt-88766bb2913cfc739"
- },
- "type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcWDEQaroqDjsMCHTAw0x_secret_OyYkEf6WNCBG2qkcM9lqdKLG96dBJrV",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcWDEQaroqDjsMCHTAw0x",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbcWDEQaroqDjs5g1r0nKs",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcWDEQaroqDjsRGPmvEws",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcXDEQaroqDjspxnyYWVs",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "91491e6f-6834-4bc8-966e-d25753bd03f7"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcVDEQaroqDjsMe4Bk8pK_secret_OyYjyh7ux5EizgjI4PYWAQUmOgh76OG",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcVDEQaroqDjsMe4Bk8pK",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcVDEQaroqDjsBYGxRkWU",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "948c865e-13a7-46d8-b1df-03a52ecbf378"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 5172,
- "amount_paid": 5172,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000001",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0003",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhTUVRMVE8wZ1FkcVREWXZGaXNlUEdFVnl6cDBELDkwMDkwMTM50200gYZHWnSh?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhTUVRMVE8wZ1FkcVREWXZGaXNlUEdFVnl6cDBELDkwMDkwMTM50200gYZHWnSh/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 5172,
- "amount_excluding_tax": 5172,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1362193445,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 1293,
- "unit_amount_decimal": "1293"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 4,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "1293"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 5172,
- "subtotal_excluding_tax": 5172,
- "tax": null,
- "test_clock": null,
- "total": 5172,
- "total_discount_amounts": [],
- "total_excluding_tax": 5172,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcVDEQaroqDjspGPnEdI3",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 5172,
- "amount_paid": 5172,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000001",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0003",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhTUVRMVE8wZ1FkcVREWXZGaXNlUEdFVnl6cDBELDkwMDkwMTM50200gYZHWnSh?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhTUVRMVE8wZ1FkcVREWXZGaXNlUEdFVnl6cDBELDkwMDkwMTM50200gYZHWnSh/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 5172,
- "amount_excluding_tax": 5172,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1362193445,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 1293,
- "unit_amount_decimal": "1293"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 4,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "1293"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 5172,
- "subtotal_excluding_tax": 5172,
- "tax": null,
- "test_clock": null,
- "total": 5172,
- "total_discount_amounts": [],
- "total_excluding_tax": 5172,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcVDEQaroqDjsgMIwNDtm",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.paid"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.4.json b/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.4.json
deleted file mode 100644
index 56be5caa558..00000000000
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.4.json
+++ /dev/null
@@ -1,1030 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 280000,
- "amount_paid": 280000,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000004",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0005",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhWaHZKWHFKa3JNMkVWcDAzankxa1VoQmlra1ZjLDkwMDkwMTQx0200zO9XWiMP?s=ap",
- "id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhWaHZKWHFKa3JNMkVWcDAzankxa1VoQmlra1ZjLDkwMDkwMTQx0200zO9XWiMP/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 280000,
- "amount_excluding_tax": 280000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000006",
- "invoice_item": "ii_NORMALIZED00000000000006",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 35,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000005/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0005",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000005",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 280000,
- "subtotal_excluding_tax": 280000,
- "tax": null,
- "test_clock": null,
- "total": 280000,
- "total_discount_amounts": [],
- "total_excluding_tax": 280000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcXDEQaroqDjsPMDSn8SM",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 280000,
- "amount_paid": 280000,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000004",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0005",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhWaHZKWHFKa3JNMkVWcDAzankxa1VoQmlra1ZjLDkwMDkwMTQx0200zO9XWiMP?s=ap",
- "id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhWaHZKWHFKa3JNMkVWcDAzankxa1VoQmlra1ZjLDkwMDkwMTQx0200zO9XWiMP/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 280000,
- "amount_excluding_tax": 280000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000006",
- "invoice_item": "ii_NORMALIZED00000000000006",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 35,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000005/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0005",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000005",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 280000,
- "subtotal_excluding_tax": 280000,
- "tax": null,
- "test_clock": null,
- "total": 280000,
- "total_discount_amounts": [],
- "total_excluding_tax": 280000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcXDEQaroqDjsgWDV0Hjm",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 280000,
- "amount_paid": 280000,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000004",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0005",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhWaHZKWHFKa3JNMkVWcDAzankxa1VoQmlra1ZjLDkwMDkwMTQx0200zO9XWiMP?s=ap",
- "id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhWaHZKWHFKa3JNMkVWcDAzankxa1VoQmlra1ZjLDkwMDkwMTQx0200zO9XWiMP/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 280000,
- "amount_excluding_tax": 280000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000006",
- "invoice_item": "ii_NORMALIZED00000000000006",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 35,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000005/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0005",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000005",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 280000,
- "subtotal_excluding_tax": 280000,
- "tax": null,
- "test_clock": null,
- "total": 280000,
- "total_discount_amounts": [],
- "total_excluding_tax": 280000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "amount_paid": 0,
- "amount_remaining": 280000,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "charge": null,
- "next_payment_attempt": 1000000000,
- "paid": false,
- "status": "open",
- "status_transitions": {
- "paid_at": null
- }
- }
- },
- "id": "evt_1OAbcXDEQaroqDjsND017Jeu",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 280000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 280000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 280000,
- "amount_captured": 280000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000004",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0005",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000004",
- "invoice": "in_NORMALIZED00000000000005",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000005",
- "payment_method": "pm_1OAaPqDEQaroqDjstlpImF2W",
- "payment_method_details": {
- "card": {
- "amount_authorized": 280000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 280000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJ2htKoGMgak1OVGA7I6LBZ9_iixWN_yCnmVSk53IhamWH5wx21mGc9ZhLOHZ4RCffonMQvB4kcDaLhu?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000004/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000005"
- },
- "client_secret": "pi_NORMALIZED00000000000005_secret_0fU9Y7h6thKzLI7uPX9p6UmnY",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0005",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000005",
- "invoice": "in_NORMALIZED00000000000005",
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAaPqDEQaroqDjstlpImF2W",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- },
- "cashapp": {}
- },
- "payment_method_types": [
- "card",
- "cashapp"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaQ5DEQaroqDjs0S7Jnjmg",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000005-initial_attempt-54cc3c5aba7c2d36f"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 240000,
- "amount_paid": 240000,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000003",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0004",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVMkZ3OVg2VlZhNk5YMXFjbHpqZmdoRGdOZEZYLDkwMDkwMTQx02002kO4G03I?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVhVMkZ3OVg2VlZhNk5YMXFjbHpqZmdoRGdOZEZYLDkwMDkwMTQx02002kO4G03I/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 240000,
- "amount_excluding_tax": 240000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0005",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 30,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 240000,
- "subtotal_excluding_tax": 240000,
- "tax": null,
- "test_clock": null,
- "total": 240000,
- "total_discount_amounts": [],
- "total_excluding_tax": 240000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcXDEQaroqDjs0OXEWNTP",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": null
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 280000,
- "amount_captured": 280000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000004",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0005",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000004",
- "invoice": "in_NORMALIZED00000000000005",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000005",
- "payment_method": "pm_1OAaPqDEQaroqDjstlpImF2W",
- "payment_method_details": {
- "card": {
- "amount_authorized": 280000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": null
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 280000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJ2htKoGMgblV6LtRaE6LBZAvFJ91hQbkqDHR4Z1aVQ3k-bhvtenmMqmcTWZgUe9JjeDAaaso8uOX_Un?s=ap",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000004/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAaQ5DEQaroqDjs0j1KUAHW",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": null,
- "idempotency_key": "in_NORMALIZED00000000000005-initial_attempt-54cc3c5aba7c2d36f"
- },
- "type": "charge.succeeded"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--PaymentIntent.create.1.json
deleted file mode 100644
index 62bd76e8d73..00000000000
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--PaymentIntent.create.1.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_JlEWumvH28V1qfotsPkUplS4r",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.modify.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.modify.1.json
index 477531ce6cd..39c35a15ad0 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "default_payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.2.json
index e1cdd2ff8cc..75c6c4af6ca 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.2.json
@@ -2,8 +2,8 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "id": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.3.json
new file mode 100644
index 00000000000..75c6c4af6ca
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYeDEQaroqDjsiczVrzIf",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.4.json
new file mode 100644
index 00000000000..75c6c4af6ca
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYeDEQaroqDjsiczVrzIf",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.5.json
new file mode 100644
index 00000000000..75c6c4af6ca
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYeDEQaroqDjsiczVrzIf",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.6.json
new file mode 100644
index 00000000000..74bd0b9a57a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZYeDEQaroqDjsiczVrzIf",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.1.json
index bf5d7d1f9c2..4414bd295ad 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.1.json
@@ -19,7 +19,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": null,
+ "default_payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"footer": null,
"rendering_options": null
},
@@ -36,17 +36,22 @@
"shipping": null,
"tax_exempt": "none",
"test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbccDEQaroqDjsShahoZvL",
+ "id": "evt_1ODZYgDEQaroqDjsA4EZR0J7",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "31dff43e-6f8e-4e73-8472-0412ad4f9af6"
+ "idempotency_key": "0b6fc68e-0653-4561-a42f-0b56f9685d1d"
},
- "type": "customer.created"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.2.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.2.json
index 8d8e1a0ce45..41ed2e0d36c 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.2.json
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKuhtKoGMgbQgwQcm646LBZ4QaEoCcS4W_df2VSj-2dMEb64of28-3dQyetjO1gEatdLmEJR3Hbqdf_w",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJG136oGMgaO4NAcEAI6LBaWsqvhjMrgT0C-XSEhYeCqTjXco9BNDHpkcRt0jEBuM1NFGCS-3gV1Ds3m",
"refunded": false,
"refunds": {
"data": [],
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_P06SceXsPgaDZylFkr0U9BvOc",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_qvTQwFeUGFHioomGXmk4BEHJh",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbceDEQaroqDjs0zrhFxB0",
+ "id": "evt_3ODZYiDEQaroqDjs1olDaYOI",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "e7935d1b-10df-4719-b68e-cd1a73fcb8cd"
+ "idempotency_key": "42824012-ed60-4267-8c54-8f1dd1b8a31a"
},
"type": "payment_intent.succeeded"
},
@@ -279,7 +279,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKuhtKoGMgZvD5DfXAc6LBbRurSJH_Wyva8VZgBB7lLR3B8vmuYXzodlHpWfS-T5ROldqQmK2Z9UPv3Q",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJG136oGMgZW6cpEcEg6LBYOccF_Is5ledDbNV3abm6wCVv99_YAdsx8u2tjYsUWTDVkN95m0baOq8q4",
"refunded": false,
"refunds": {
"data": [],
@@ -341,364 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbceDEQaroqDjs0RzzXH2v",
+ "id": "evt_3ODZYiDEQaroqDjs1scjNopF",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "e7935d1b-10df-4719-b68e-cd1a73fcb8cd"
+ "idempotency_key": "42824012-ed60-4267-8c54-8f1dd1b8a31a"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbciDEQaroqDjsHgs8sbcP",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "c2aa1d5e-9452-480b-a0d4-6e5813970e21"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcgDEQaroqDjswY6hIVKP_secret_OyYkNzAo8iSTzmLdrWK6G65xv5fLRYN",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcgDEQaroqDjswY6hIVKP",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbcgDEQaroqDjsan5wzFTh",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbchDEQaroqDjs2X4QrjBY",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "7613137e-dd15-4147-a003-cda6739f456c"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbchDEQaroqDjs7BEIztrW",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "7613137e-dd15-4147-a003-cda6739f456c"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcgDEQaroqDjswY6hIVKP_secret_OyYkNzAo8iSTzmLdrWK6G65xv5fLRYN",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcgDEQaroqDjswY6hIVKP",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbcgDEQaroqDjsan5wzFTh",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbchDEQaroqDjs41N6Ax1X",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "7613137e-dd15-4147-a003-cda6739f456c"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbcfDEQaroqDjsjWyWplFU_secret_OyYk46SkqPxtIEmAFOKaIy3iJuCQXHg",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbcfDEQaroqDjsjWyWplFU",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbcfDEQaroqDjsgwCKM59b",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "075910ce-303e-42a0-917a-9a821b67e785"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_P06SceXsPgaDZylFkr0U9BvOc",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "11"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbceDEQaroqDjs0QcYblkl",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "a6ba34f6-b03e-485b-9b48-d484c04d55ce"
- },
- "type": "payment_intent.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.3.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.3.json
index 1dfac02ae52..8bff647b0e0 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.3.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU50200lb3hHekX?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjAz0200f1hhZu0B?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU50200lb3hHekX/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjAz0200f1hhZu0B/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -67,677 +67,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcpDEQaroqDjst09vuXKg",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "b073d7e1-7f13-409c-9ae3-a25d6ae6546e"
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU50200lb3hHekX?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU50200lb3hHekX/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcpDEQaroqDjshjYwEkvz",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "b073d7e1-7f13-409c-9ae3-a25d6ae6546e"
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU402003iCN0Cvl?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU402003iCN0Cvl/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbcoDEQaroqDjs29HgWlEm",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "b073d7e1-7f13-409c-9ae3-a25d6ae6546e"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU402003iCN0Cvl?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU402003iCN0Cvl/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -879,7 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -903,13 +234,13 @@
}
}
},
- "id": "evt_1OAbcoDEQaroqDjs4Ozco4VX",
+ "id": "evt_1ODZYlDEQaroqDjs3cdnpHHN",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "b073d7e1-7f13-409c-9ae3-a25d6ae6546e"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7b75fe12-4954-4686-9c14-b6cd98acdce3"
},
"type": "invoice.updated"
},
@@ -980,8 +311,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -1126,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbcnDEQaroqDjsuwjPQuPg",
+ "id": "evt_1ODZYlDEQaroqDjsYamIAqgE",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "e27773e4-891a-46b5-9991-878c5ab5a3b9"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "6e6734ec-3e68-4273-863d-b4ba3078c496"
},
"type": "invoice.created"
},
@@ -1154,8 +485,8 @@
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -1188,13 +519,13 @@
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbcnDEQaroqDjs5wprQ3Bc",
+ "id": "evt_1ODZYkDEQaroqDjsZwF5mIIM",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "a09d1537-e9fe-415b-95d9-221a08fd3a76"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "ea2a81da-9a89-479e-816b-4b4948d78208"
},
"type": "invoiceitem.created"
},
@@ -1250,13 +581,13 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbcmDEQaroqDjs32VZEU7h",
+ "id": "evt_1ODZYkDEQaroqDjsQ4KCj2jb",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "48e01e34-8375-4840-820c-b57a7311b560"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "7c8cce5e-8213-4683-851d-94aede856383"
},
"type": "invoiceitem.created"
},
@@ -1279,7 +610,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "default_payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"footer": null,
"rendering_options": null
},
@@ -1302,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbcmDEQaroqDjsmeNkaIIG",
+ "id": "evt_1ODZYkDEQaroqDjsootSbU1N",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "48e01e34-8375-4840-820c-b57a7311b560"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "7c8cce5e-8213-4683-851d-94aede856383"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.4.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.4.json
index 6d922067afe..1b373caeb8e 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.4.json
@@ -1,5 +1,452 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjA00200h0poKs6S?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjA00200h0poKs6S/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZYmDEQaroqDjsbbfpjK0M",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 2,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7b75fe12-4954-4686-9c14-b6cd98acdce3"
+ },
+ "type": "invoice.paid"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjAz0200f1hhZu0B?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjAz0200f1hhZu0B/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZYlDEQaroqDjs0dLa7QRL",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7b75fe12-4954-4686-9c14-b6cd98acdce3"
+ },
+ "type": "invoice.finalized"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.5.json
similarity index 87%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.1.json
rename to corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.5.json
index c9b2c61a14e..529b0e61917 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.5.json
@@ -27,9 +27,9 @@
"created": 1000000000,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0002",
+ "customer": "cus_NORMALIZED0001",
"customer_address": null,
- "customer_email": "[email protected]",
+ "customer_email": "[email protected]",
"customer_name": null,
"customer_phone": null,
"customer_shipping": null,
@@ -46,16 +46,16 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUz0200cmDP6dkE?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjA00200h0poKs6S?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUz0200cmDP6dkE/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjA00200h0poKs6S/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
"data": [
{
- "amount": 184000,
- "amount_excluding_tax": 184000,
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
@@ -67,8 +67,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -96,7 +96,7 @@
"proration_details": {
"credited_items": null
},
- "quantity": 23,
+ "quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
@@ -104,8 +104,8 @@
"unit_amount_excluding_tax": "8000"
},
{
- "amount": -184000,
- "amount_excluding_tax": -184000,
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
@@ -139,8 +139,8 @@
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
},
"proration": false,
"proration_details": {
@@ -151,7 +151,7 @@
"tax_amounts": [],
"tax_rates": [],
"type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
@@ -162,7 +162,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,21 +210,21 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbhZDEQaroqDjsMKojdzkZ",
+ "id": "evt_1ODZYmDEQaroqDjsZCRgID9m",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0001",
- "idempotency_key": "325b4bd2-369b-411c-bc0d-6b262684015b"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7b75fe12-4954-4686-9c14-b6cd98acdce3"
},
"type": "invoice.payment_succeeded"
}
],
- "has_more": true,
+ "has_more": false,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.3.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.6.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.3.json
rename to corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Event.list.6.json
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.create.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.create.1.json
index f35db5965e1..bf914816ea4 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.create.1.json
@@ -61,8 +61,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.finalize_invoice.1.json
index 1af00ca61b5..138a31000a1 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU402003iCN0Cvl?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjAz0200f1hhZu0B?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrZVhTZEg4TmFVMVJaNE5hRTk2M3lhN21JMGgyLDkwMDkwMTU402003iCN0Cvl/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOFR5c1BsWVk5MGxEdGZLTXFnME1MMDJrcDYwLDkwNzk3MjAz0200f1hhZu0B/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--InvoiceItem.create.2.json
index 23f69ee2e0c..11622f30a73 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--InvoiceItem.create.2.json
@@ -12,8 +12,8 @@
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.confirm.1.json
deleted file mode 100644
index 1997c534a51..00000000000
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "11"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKuhtKoGMgZj7ZxF5qw6LBbmtKtZ5GL4eizHzbWXLOVD567VAQAJgMYJDdnE0GYfnyq_pgmUDdbxF-XI",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_P06SceXsPgaDZylFkr0U9BvOc",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "11"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.create.1.json
index 843475bd8a3..1f4c48d0691 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,13 +12,138 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "11"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJG136oGMgZ-opto9Z86LBYonnc9st7QkC36Znml7bGbAPKLy3yiXUA6AN4KAZdtUiyMBgG-q8XKZBiH",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
+ "total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_P06SceXsPgaDZylFkr0U9BvOc",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_qvTQwFeUGFHioomGXmk4BEHJh",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -27,7 +152,7 @@
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.create.1.json
index fb9c5c6ae35..82f66f8a437 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcgDEQaroqDjswY6hIVKP_secret_OyYkNzAo8iSTzmLdrWK6G65xv5fLRYN",
+ "client_secret": "seti_1ODZYeDEQaroqDjs9e6fjHc6_secret_P1colWNC35WzXSZLTA41nEeQNs6MKFe",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcgDEQaroqDjswY6hIVKP",
+ "id": "seti_1ODZYeDEQaroqDjs9e6fjHc6",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbcgDEQaroqDjsan5wzFTh",
+ "latest_attempt": "setatt_1ODZYeDEQaroqDjsC4elXXo5",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.list.1.json
index 87aa9c35e2c..5790c01dbb8 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcfDEQaroqDjsjWyWplFU_secret_OyYk46SkqPxtIEmAFOKaIy3iJuCQXHg",
+ "client_secret": "seti_1ODZYdDEQaroqDjsAW84g6pW_secret_P1codVp6X3MPBW6PpP2WwvgVCPIikRY",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcfDEQaroqDjsjWyWplFU",
+ "id": "seti_1ODZYdDEQaroqDjsAW84g6pW",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.retrieve.1.json
index fb9c5c6ae35..82f66f8a437 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcgDEQaroqDjswY6hIVKP_secret_OyYkNzAo8iSTzmLdrWK6G65xv5fLRYN",
+ "client_secret": "seti_1ODZYeDEQaroqDjs9e6fjHc6_secret_P1colWNC35WzXSZLTA41nEeQNs6MKFe",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcgDEQaroqDjswY6hIVKP",
+ "id": "seti_1ODZYeDEQaroqDjs9e6fjHc6",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbcgDEQaroqDjsan5wzFTh",
+ "latest_attempt": "setatt_1ODZYeDEQaroqDjsC4elXXo5",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcgDEQaroqDjsSQx9p6Xn",
+ "payment_method": "pm_1ODZYeDEQaroqDjsiczVrzIf",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.create.1.json
index 55be6bc552d..08d024d43e8 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02swh1pxMKrv7EBOnrNnld066e1D8ANwVnJ6w6jxwm1gnxvt",
+ "id": "cs_test_NORMALIZED02mHVWCRf2Qyqf6qvbyMZbNQsVKqhRHcv3nwbgLN94F7h0LK",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "11"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbcfDEQaroqDjsjWyWplFU",
+ "setup_intent": "seti_1ODZYdDEQaroqDjsAW84g6pW",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02swh1pxMKrv7EBOnrNnld066e1D8ANwVnJ6w6jxwm1gnxvt#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02mHVWCRf2Qyqf6qvbyMZbNQsVKqhRHcv3nwbgLN94F7h0LK#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.list.1.json
index 118e1a67e3f..48b8e64f317 100644
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_payment_method--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02swh1pxMKrv7EBOnrNnld066e1D8ANwVnJ6w6jxwm1gnxvt",
+ "id": "cs_test_NORMALIZED02mHVWCRf2Qyqf6qvbyMZbNQsVKqhRHcv3nwbgLN94F7h0LK",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "11"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbcfDEQaroqDjsjWyWplFU",
+ "setup_intent": "seti_1ODZYdDEQaroqDjsAW84g6pW",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02swh1pxMKrv7EBOnrNnld066e1D8ANwVnJ6w6jxwm1gnxvt#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02mHVWCRf2Qyqf6qvbyMZbNQsVKqhRHcv3nwbgLN94F7h0LK#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.create.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.create.1.json
deleted file mode 100644
index 276fd1f723d..00000000000
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.create.1.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.create.2.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.create.2.json
deleted file mode 100644
index 4cdc7ec73f5..00000000000
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.create.2.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": "card_NORMALIZED00000000000001",
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0002",
- "invoice_prefix": "NORMA02",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.retrieve.1.json
deleted file mode 100644
index 16a7af69f0e..00000000000
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.retrieve.1.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/sources"
- },
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.retrieve.2.json
deleted file mode 100644
index c62944d8685..00000000000
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Customer.retrieve.2.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": {
- "address_city": "Pacific",
- "address_country": "United States",
- "address_line1": "Under the sea,",
- "address_line1_check": "pass",
- "address_line2": null,
- "address_state": null,
- "address_zip": "33333",
- "address_zip_check": "pass",
- "brand": "Visa",
- "country": "US",
- "customer": "cus_NORMALIZED0002",
- "cvc_check": "pass",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000001",
- "last4": "4242",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- },
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0002",
- "invoice_prefix": "NORMA02",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "sources": {
- "data": [
- {
- "address_city": "Pacific",
- "address_country": "United States",
- "address_line1": "Under the sea,",
- "address_line1_check": "pass",
- "address_line2": null,
- "address_state": null,
- "address_zip": "33333",
- "address_zip_check": "pass",
- "brand": "Visa",
- "country": "US",
- "customer": "cus_NORMALIZED0002",
- "cvc_check": "pass",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000001",
- "last4": "4242",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/customers/cus_NORMALIZED0002/sources"
- },
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Token.create.1.json b/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Token.create.1.json
deleted file mode 100644
index 60d47536e7c..00000000000
--- a/corporate/tests/stripe_fixtures/customer_has_credit_card_as_default_source--Token.create.1.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "card": {
- "address_city": "Pacific",
- "address_country": "United States",
- "address_line1": "Under the sea,",
- "address_line1_check": "unchecked",
- "address_line2": null,
- "address_state": null,
- "address_zip": "33333",
- "address_zip_check": "unchecked",
- "brand": "Visa",
- "country": "US",
- "cvc_check": "unchecked",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000001",
- "last4": "4242",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- },
- "client_ip": "0.0.0.0",
- "created": 1000000000,
- "id": "tok_NORMALIZED00000000000001",
- "livemode": false,
- "object": "token",
- "type": "card",
- "used": false
-}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Customer.create.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.create.1.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Customer.create.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.create.1.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.modify.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.modify.1.json
similarity index 91%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.modify.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.modify.1.json
index d90058980ef..10f849e190b 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
+ "default_payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.1.json
new file mode 100644
index 00000000000..e9acf0416ef
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.2.json
new file mode 100644
index 00000000000..e9acf0416ef
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.3.json
new file mode 100644
index 00000000000..e9acf0416ef
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.4.json
new file mode 100644
index 00000000000..e9acf0416ef
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.5.json
new file mode 100644
index 00000000000..e9acf0416ef
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.6.json
new file mode 100644
index 00000000000..e9acf0416ef
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.1.json
new file mode 100644
index 00000000000..5d6640e1b6f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.1.json
@@ -0,0 +1,60 @@
+{
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
+ }
+ },
+ "id": "evt_1ODgevDEQaroqDjsUPlzpWqh",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0001",
+ "idempotency_key": "a562b449-3ad2-40b8-9e54-4ba33341432c"
+ },
+ "type": "customer.updated"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.3.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.10.json
similarity index 75%
rename from corporate/tests/stripe_fixtures/replace_payment_source--Event.list.3.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.10.json
index 80fbd3fb683..03e454f8174 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.10.json
@@ -6,11 +6,13 @@
"data": {
"object": {
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
"application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
@@ -40,23 +42,27 @@
"discount": null,
"discounts": [],
"due_date": null,
+ "effective_at": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH/pdf",
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg/pdf?s=ap",
"last_finalization_error": null,
+ "latest_revision": null,
"lines": {
"data": [
{
"amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -70,13 +76,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000002",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -86,21 +93,26 @@
"unit_amount_decimal": "8000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
},
{
"amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -114,13 +126,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000003",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -130,27 +143,33 @@
"unit_amount_decimal": "-48000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 1,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
+ "paid_out_of_band": false,
"payment_intent": null,
"payment_settings": {
+ "default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
@@ -160,6 +179,15 @@
"pre_payment_credit_notes_amount": 0,
"quote": null,
"receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
@@ -170,22 +198,28 @@
"voided_at": null
},
"subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
"subtotal": 0,
+ "subtotal_excluding_tax": 0,
"tax": null,
+ "test_clock": null,
"total": 0,
"total_discount_amounts": [],
+ "total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": null
}
},
- "id": "evt_1JItStA4KHR4JzRv8WU2L7QL",
+ "id": "evt_1ODgf4DEQaroqDjs55GWspZ0",
"livemode": false,
"object": "event",
- "pending_webhooks": 1,
+ "pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "0ffa9c41-6971-44db-9446-23b89f376750"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.payment_succeeded"
},
@@ -195,11 +229,13 @@
"data": {
"object": {
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
"application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
@@ -229,23 +265,27 @@
"discount": null,
"discounts": [],
"due_date": null,
+ "effective_at": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH/pdf",
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg/pdf?s=ap",
"last_finalization_error": null,
+ "latest_revision": null,
"lines": {
"data": [
{
"amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -259,13 +299,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000002",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -275,21 +316,26 @@
"unit_amount_decimal": "8000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
},
{
"amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -303,13 +349,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000003",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -319,27 +366,33 @@
"unit_amount_decimal": "-48000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 1,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
+ "paid_out_of_band": false,
"payment_intent": null,
"payment_settings": {
+ "default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
@@ -349,6 +402,15 @@
"pre_payment_credit_notes_amount": 0,
"quote": null,
"receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
@@ -359,22 +421,28 @@
"voided_at": null
},
"subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
"subtotal": 0,
+ "subtotal_excluding_tax": 0,
"tax": null,
+ "test_clock": null,
"total": 0,
"total_discount_amounts": [],
+ "total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": null
}
},
- "id": "evt_1JItStA4KHR4JzRvi0Xcy47B",
+ "id": "evt_1ODgf4DEQaroqDjstyqrYibR",
"livemode": false,
"object": "event",
- "pending_webhooks": 1,
+ "pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "0ffa9c41-6971-44db-9446-23b89f376750"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.paid"
},
@@ -384,11 +452,13 @@
"data": {
"object": {
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
"application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
@@ -418,23 +488,27 @@
"discount": null,
"discounts": [],
"due_date": null,
+ "effective_at": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH/pdf",
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg/pdf?s=ap",
"last_finalization_error": null,
+ "latest_revision": null,
"lines": {
"data": [
{
"amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -448,13 +522,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000002",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -464,21 +539,26 @@
"unit_amount_decimal": "8000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
},
{
"amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -492,13 +572,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000003",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -508,27 +589,33 @@
"unit_amount_decimal": "-48000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 1,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
+ "paid_out_of_band": false,
"payment_intent": null,
"payment_settings": {
+ "default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
@@ -538,6 +625,15 @@
"pre_payment_credit_notes_amount": 0,
"quote": null,
"receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
@@ -548,22 +644,28 @@
"voided_at": null
},
"subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
"subtotal": 0,
+ "subtotal_excluding_tax": 0,
"tax": null,
+ "test_clock": null,
"total": 0,
"total_discount_amounts": [],
+ "total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": null
}
},
- "id": "evt_1JItStA4KHR4JzRv0Vszdsye",
+ "id": "evt_1ODgf4DEQaroqDjsmueYQh1U",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "0ffa9c41-6971-44db-9446-23b89f376750"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.finalized"
},
@@ -573,11 +675,13 @@
"data": {
"object": {
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
"application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
@@ -607,23 +711,27 @@
"discount": null,
"discounts": [],
"due_date": null,
+ "effective_at": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH/pdf",
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAx0200QQfMKIqx?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAx0200QQfMKIqx/pdf?s=ap",
"last_finalization_error": null,
+ "latest_revision": null,
"lines": {
"data": [
{
"amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -637,13 +745,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000002",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -653,21 +762,26 @@
"unit_amount_decimal": "8000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
},
{
"amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -681,13 +795,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000003",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -697,27 +812,33 @@
"unit_amount_decimal": "-48000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 1,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
+ "paid_out_of_band": false,
"payment_intent": null,
"payment_settings": {
+ "default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
@@ -727,6 +848,15 @@
"pre_payment_credit_notes_amount": 0,
"quote": null,
"receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
@@ -737,10 +867,16 @@
"voided_at": null
},
"subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
"subtotal": 0,
+ "subtotal_excluding_tax": 0,
"tax": null,
+ "test_clock": null,
"total": 0,
"total_discount_amounts": [],
+ "total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": null
@@ -748,12 +884,18 @@
"previous_attributes": {
"attempted": false,
"auto_advance": true,
+ "effective_at": null,
"ending_balance": null,
"hosted_invoice_url": null,
"invoice_pdf": null,
"next_payment_attempt": 1000000000,
"number": null,
"paid": false,
+ "rendering": {
+ "pdf": {
+ "page_size": "auto"
+ }
+ },
"status": "draft",
"status_transitions": {
"finalized_at": null,
@@ -761,13 +903,13 @@
}
}
},
- "id": "evt_1JItStA4KHR4JzRvetwD3jGX",
+ "id": "evt_1ODgf3DEQaroqDjsOKtP92sc",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "0ffa9c41-6971-44db-9446-23b89f376750"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.updated"
},
@@ -777,11 +919,13 @@
"data": {
"object": {
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
"application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
@@ -811,23 +955,27 @@
"discount": null,
"discounts": [],
"due_date": null,
+ "effective_at": null,
"ending_balance": null,
"footer": null,
+ "from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
+ "latest_revision": null,
"lines": {
"data": [
{
"amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -841,13 +989,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000002",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -857,21 +1006,26 @@
"unit_amount_decimal": "8000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
},
{
"amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -885,13 +1039,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000003",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -901,17 +1056,21 @@
"unit_amount_decimal": "-48000"
},
"proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
"quantity": 1,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem"
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -920,8 +1079,10 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
+ "paid_out_of_band": false,
"payment_intent": null,
"payment_settings": {
+ "default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
@@ -931,6 +1092,15 @@
"pre_payment_credit_notes_amount": 0,
"quote": null,
"receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "auto"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
"status": "draft",
@@ -941,88 +1111,31 @@
"voided_at": null
},
"subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
"subtotal": 0,
+ "subtotal_excluding_tax": 0,
"tax": null,
+ "test_clock": null,
"total": 0,
"total_discount_amounts": [],
+ "total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": null
}
},
- "id": "evt_1JItSsA4KHR4JzRvr2ObNmrm",
+ "id": "evt_1ODgf3DEQaroqDjs1sTUbZQ0",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "60553241-ce66-438d-93a3-a853150437e7"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "a504e806-7bc2-4ab1-817e-d6fea1e02693"
},
"type": "invoice.created"
},
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": -48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "previous_attributes": {
- "invoice": null
- }
- },
- "id": "evt_1JItSsA4KHR4JzRvVZ3U32IA",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "60553241-ce66-438d-93a3-a853150437e7"
- },
- "type": "invoiceitem.updated"
- },
{
"api_version": "2020-08-27",
"created": 1000000000,
@@ -1035,70 +1148,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "previous_attributes": {
- "invoice": null
- }
- },
- "id": "evt_1JItSsA4KHR4JzRvPVa7qQ4P",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 1,
- "request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "60553241-ce66-438d-93a3-a853150437e7"
- },
- "type": "invoiceitem.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -1113,13 +1163,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000002",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -1132,17 +1183,18 @@
"quantity": 6,
"subscription": null,
"tax_rates": [],
+ "test_clock": null,
"unit_amount": 8000,
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1JItSrA4KHR4JzRvmJd2oAtZ",
+ "id": "evt_1ODgf2DEQaroqDjs0jOwFkRY",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "87a9e8e5-9f1e-414c-87a8-c58b051a5c2a"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "ba8fbe41-28bd-485b-84e3-ac297707511d"
},
"type": "invoiceitem.created"
},
@@ -1158,7 +1210,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -1173,13 +1225,14 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_NORMALIZED00000000000003",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -1192,17 +1245,18 @@
"quantity": 1,
"subscription": null,
"tax_rates": [],
+ "test_clock": null,
"unit_amount": -48000,
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1JItSrA4KHR4JzRvEnep3mvw",
+ "id": "evt_1ODgf2DEQaroqDjsxLOKnLir",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "07db5c3a-7431-4579-b57b-309f554f8ab7"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "930103a4-f39c-429b-aa7e-a361d5cfd000"
},
"type": "invoiceitem.created"
},
@@ -1215,6 +1269,7 @@
"balance": 0,
"created": 1000000000,
"currency": "usd",
+ "default_currency": "usd",
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -1224,8 +1279,9 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "footer": null
+ "default_payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
"metadata": {
@@ -1238,19 +1294,21 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "tax_exempt": "none"
+ "tax_exempt": "none",
+ "test_clock": null
},
"previous_attributes": {
- "currency": null
+ "currency": null,
+ "default_currency": null
}
},
- "id": "evt_1JItSrA4KHR4JzRvftHO2MBA",
+ "id": "evt_1ODgf2DEQaroqDjsZ5naO5D4",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "07db5c3a-7431-4579-b57b-309f554f8ab7"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "930103a4-f39c-429b-aa7e-a361d5cfd000"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.4.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.11.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/replace_payment_source--Event.list.4.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.11.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.5.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.2.json
similarity index 69%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.5.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.2.json
index a3939c3865e..a25db417f62 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.2.json
@@ -10,7 +10,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -21,12 +21,12 @@
"data": [
{
"amount": 48000,
- "amount_captured": 0,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
- "balance_transaction": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
"billing_details": {
"address": {
"city": null,
@@ -41,7 +41,7 @@
"phone": null
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
+ "captured": true,
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
@@ -50,8 +50,8 @@
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
+ "failure_code": null,
+ "failure_message": null,
"fraud_details": {},
"id": "ch_NORMALIZED00000000000001",
"invoice": null,
@@ -73,19 +73,19 @@
"on_behalf_of": null,
"order": null,
"outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
+ "network_status": "approved_by_network",
+ "reason": null,
"risk_level": "normal",
"risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "paid": false,
+ "paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
- "amount_authorized": null,
+ "amount_authorized": 48000,
"brand": "visa",
"checks": {
"address_line1_check": null,
@@ -104,7 +104,7 @@
"status": "unavailable"
},
"installments": null,
- "last4": "0341",
+ "last4": "4242",
"mandate": null,
"multicapture": {
"status": "unavailable"
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLCK4aoGMgbScB7c2R06LBYFXfy2w5bkFdvYjTVoLb-t33XZhS99JyYvneJa9ZwPTo2pbcvfrpfGlARq",
"refunded": false,
"refunds": {
"data": [],
@@ -139,7 +139,7 @@
"source_transfer": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "failed",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_DgL6bvWBybLYhTrU6NPOlBXFn",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -157,61 +157,7 @@
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
+ "last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
@@ -230,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -251,20 +197,20 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
- "id": "evt_3OAbheDEQaroqDjs1uxkGnca",
+ "id": "evt_3ODgexDEQaroqDjs15exVOCo",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "5fc43bcc-574e-442d-889c-0028b89993ab"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "94d834d0-62a1-4771-b8f3-468c40231435"
},
- "type": "payment_intent.payment_failed"
+ "type": "payment_intent.succeeded"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.4.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.3.json
similarity index 69%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.4.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.3.json
index f48c040b86e..11c2c74e96b 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.3.json
@@ -10,7 +10,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -21,12 +21,12 @@
"data": [
{
"amount": 48000,
- "amount_captured": 0,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
- "balance_transaction": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
"billing_details": {
"address": {
"city": null,
@@ -41,7 +41,7 @@
"phone": null
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
+ "captured": true,
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
@@ -50,8 +50,8 @@
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
+ "failure_code": null,
+ "failure_message": null,
"fraud_details": {},
"id": "ch_NORMALIZED00000000000001",
"invoice": null,
@@ -73,19 +73,19 @@
"on_behalf_of": null,
"order": null,
"outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
+ "network_status": "approved_by_network",
+ "reason": null,
"risk_level": "normal",
"risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "paid": false,
+ "paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
- "amount_authorized": null,
+ "amount_authorized": 48000,
"brand": "visa",
"checks": {
"address_line1_check": null,
@@ -104,7 +104,7 @@
"status": "unavailable"
},
"installments": null,
- "last4": "0341",
+ "last4": "4242",
"mandate": null,
"multicapture": {
"status": "unavailable"
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLCK4aoGMgbScB7c2R06LBYFXfy2w5bkFdvYjTVoLb-t33XZhS99JyYvneJa9ZwPTo2pbcvfrpfGlARq",
"refunded": false,
"refunds": {
"data": [],
@@ -139,7 +139,7 @@
"source_transfer": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "failed",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_DgL6bvWBybLYhTrU6NPOlBXFn",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -157,61 +157,7 @@
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
+ "last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
@@ -230,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -251,20 +197,20 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
- "id": "evt_3OAbhDDEQaroqDjs0E7KJbEn",
+ "id": "evt_3ODgexDEQaroqDjs15exVOCo",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "40bde32f-040e-4101-8829-8eaff30c1b2f"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "94d834d0-62a1-4771-b8f3-468c40231435"
},
- "type": "payment_intent.payment_failed"
+ "type": "payment_intent.succeeded"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.3.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.4.json
similarity index 66%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.3.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.4.json
index 534eb5b978a..9647d8490d4 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.4.json
@@ -10,7 +10,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -21,12 +21,12 @@
"data": [
{
"amount": 48000,
- "amount_captured": 0,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
- "balance_transaction": null,
+ "balance_transaction": "txn_NORMALIZED00000000000002",
"billing_details": {
"address": {
"city": null,
@@ -41,7 +41,7 @@
"phone": null
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
+ "captured": true,
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
@@ -50,10 +50,10 @@
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
+ "failure_code": null,
+ "failure_message": null,
"fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
+ "id": "ch_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {
@@ -73,19 +73,19 @@
"on_behalf_of": null,
"order": null,
"outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
+ "network_status": "approved_by_network",
+ "reason": null,
"risk_level": "normal",
"risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
- "amount_authorized": null,
+ "amount_authorized": 48000,
"brand": "visa",
"checks": {
"address_line1_check": null,
@@ -104,7 +104,7 @@
"status": "unavailable"
},
"installments": null,
- "last4": "0341",
+ "last4": "4242",
"mandate": null,
"multicapture": {
"status": "unavailable"
@@ -124,14 +124,14 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLOK4aoGMgZuMOaIyr86LBZWAJH5nVd779UFV54XjtcTnEdvWuyfeJxA8Cl4onKlanHz2-pjQkUgOUNf",
"refunded": false,
"refunds": {
"data": [],
"has_more": false,
"object": "list",
"total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
},
"review": null,
"shipping": null,
@@ -139,7 +139,7 @@
"source_transfer": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "failed",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
@@ -147,72 +147,18 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_xrY8vVEoYQG7bgmqqnsQxiNF6",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
+ "id": "pi_NORMALIZED00000000000002",
"invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "latest_charge": "ch_NORMALIZED00000000000001",
+ "last_payment_error": null,
+ "latest_charge": "ch_NORMALIZED00000000000002",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -230,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -251,23 +197,23 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
- "id": "evt_3OAbheDEQaroqDjs1uxkGnca",
+ "id": "evt_3ODgf0DEQaroqDjs0o5F5ovB",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "5fc43bcc-574e-442d-889c-0028b89993ab"
+ "id": "req_NORMALIZED0007",
+ "idempotency_key": "793170fa-e3ee-427e-8bac-f2fef31a9b03"
},
- "type": "payment_intent.payment_failed"
+ "type": "payment_intent.succeeded"
}
],
- "has_more": false,
+ "has_more": true,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.6.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.5.json
similarity index 60%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.6.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.5.json
index 77fdc362edf..de2aa3f0f5e 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.6.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.5.json
@@ -26,7 +26,7 @@
"application": null,
"application_fee": null,
"application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
+ "balance_transaction": "txn_NORMALIZED00000000000002",
"billing_details": {
"address": {
"city": null,
@@ -81,8 +81,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -98,7 +98,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000002",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKO-jtKoGMgZUM5kE4Lw6LBYauXe3X2wH4XR4jpRPubcM_q2rnj6YWNfDotX90zKeCtgdHUabMtNYJoJ1",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLOK4aoGMgZuMOaIyr86LBZWAJH5nVd779UFV54XjtcTnEdvWuyfeJxA8Cl4onKlanHz2-pjQkUgOUNf",
"refunded": false,
"refunds": {
"data": [],
@@ -144,18 +144,18 @@
"transfer_group": null
}
],
- "has_more": true,
+ "has_more": false,
"object": "list",
- "total_count": 2,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_xrY8vVEoYQG7bgmqqnsQxiNF6",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
+ "id": "pi_NORMALIZED00000000000002",
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000002",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbheDEQaroqDjs19rtMugv",
+ "id": "evt_3ODgf0DEQaroqDjs0o5F5ovB",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "8d7c88a7-813d-496d-9d59-0f9c504f3b0b"
+ "id": "req_NORMALIZED0007",
+ "idempotency_key": "793170fa-e3ee-427e-8bac-f2fef31a9b03"
},
"type": "payment_intent.succeeded"
},
@@ -223,7 +223,7 @@
"application": null,
"application_fee": null,
"application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
+ "balance_transaction": "txn_NORMALIZED00000000000002",
"billing_details": {
"address": {
"city": null,
@@ -278,8 +278,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -295,7 +295,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000002",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKO-jtKoGMgaseQfyop46LBbP5Crak4A-bIHvX4KywPVisiH6Oy-ym6B2B3Um86U6BY3e8ln1Lus1rOJS",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLOK4aoGMgZ7Kw3oeWY6LBbKSvK-Q8ZM2i7VuoOtXaaNoDO8miOxjsNbRF17XNg2NAd1ZIJZyJi06iD_",
"refunded": false,
"refunds": {
"data": [],
@@ -341,13 +341,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbheDEQaroqDjs17mtphSZ",
+ "id": "evt_3ODgf0DEQaroqDjs0i0JFo07",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "8d7c88a7-813d-496d-9d59-0f9c504f3b0b"
+ "id": "req_NORMALIZED0007",
+ "idempotency_key": "793170fa-e3ee-427e-8bac-f2fef31a9b03"
},
"type": "charge.succeeded"
},
@@ -356,240 +356,57 @@
"created": 1000000000,
"data": {
"object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
+ "amount": 48000,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
},
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga"
- }
- }
- },
- "id": "evt_1OAbhxDEQaroqDjscLOkCXK9",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "dbb78927-d8f2-498d-b5e2-2cee77c0721b"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
+ "amount_received": 0,
"application": null,
+ "application_fee_amount": null,
"automatic_payment_methods": null,
+ "canceled_at": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbhvDEQaroqDjsy8bIZeUy_secret_OyYpHjLdyfxD0L0P2g9htsni4G85sJe",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhvDEQaroqDjsy8bIZeUy",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhvDEQaroqDjsDNwcsk05",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhwDEQaroqDjsFQKFCxB4",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "edadb55c-1c02-4441-ba38-1a5df370e947"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
+ "capture_method": "automatic",
+ "charges": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
+ "client_secret": "pi_NORMALIZED00000000000002_secret_xrY8vVEoYQG7bgmqqnsQxiNF6",
+ "confirmation_method": "automatic",
"created": 1000000000,
+ "currency": "usd",
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbhvDEQaroqDjseclIAP5b",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "edadb55c-1c02-4441-ba38-1a5df370e947"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhvDEQaroqDjsy8bIZeUy_secret_OyYpHjLdyfxD0L0P2g9htsni4G85sJe",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhvDEQaroqDjsy8bIZeUy",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhvDEQaroqDjsDNwcsk05",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "id": "pi_NORMALIZED00000000000002",
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
"livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
},
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhwDEQaroqDjs1R3lK2Q6",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "edadb55c-1c02-4441-ba38-1a5df370e947"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhtDEQaroqDjsBMYqM1fx_secret_OyYpbXauiRC6Ipp9U7RJkkt9F5BiVMV",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhtDEQaroqDjsBMYqM1fx",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
"next_action": null,
- "object": "setup_intent",
+ "object": "payment_intent",
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
+ "installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
@@ -598,20 +415,28 @@
"payment_method_types": [
"card"
],
- "single_use_mandate": null,
+ "processing": null,
+ "receipt_email": "[email protected]",
+ "review": null,
+ "setup_future_usage": null,
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
"status": "requires_payment_method",
- "usage": "off_session"
+ "transfer_data": null,
+ "transfer_group": null
}
},
- "id": "evt_1OAbhtDEQaroqDjsZ23vXPK0",
+ "id": "evt_3ODgf0DEQaroqDjs0dRknHUN",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "8fc4f700-05be-498e-851e-970a4feb576c"
+ "id": "req_NORMALIZED0007",
+ "idempotency_key": "793170fa-e3ee-427e-8bac-f2fef31a9b03"
},
- "type": "setup_intent.created"
+ "type": "payment_intent.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.7.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.6.json
similarity index 90%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.7.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.6.json
index 46176bf5a7a..1f45330625e 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.7.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.6.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAx0200QQfMKIqx?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAx0200QQfMKIqx/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -111,8 +111,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -127,7 +127,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -157,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,7 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -234,13 +234,13 @@
}
}
},
- "id": "evt_1OAbi4DEQaroqDjsf3jOmadp",
+ "id": "evt_1ODgf3DEQaroqDjsOKtP92sc",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "ae809e85-ee29-4758-8e0e-ee880812060c"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.updated"
},
@@ -291,7 +291,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -305,8 +305,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -355,8 +355,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -371,7 +371,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -401,7 +401,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -457,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbi3DEQaroqDjsPOH3L8RP",
+ "id": "evt_1ODgf3DEQaroqDjs1sTUbZQ0",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0013",
- "idempotency_key": "879a4b75-3ea6-4f38-90b5-f6c722597301"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "a504e806-7bc2-4ab1-817e-d6fea1e02693"
},
"type": "invoice.created"
},
@@ -479,7 +479,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -519,13 +519,13 @@
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbi2DEQaroqDjshLREcpua",
+ "id": "evt_1ODgf2DEQaroqDjs0jOwFkRY",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0014",
- "idempotency_key": "c2cf4157-8184-4bf2-9cea-c73cd461b888"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "ba8fbe41-28bd-485b-84e3-ac297707511d"
},
"type": "invoiceitem.created"
},
@@ -541,7 +541,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -557,7 +557,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -581,13 +581,13 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbi1DEQaroqDjsatS0CckM",
+ "id": "evt_1ODgf2DEQaroqDjsxLOKnLir",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0015",
- "idempotency_key": "0c3943d4-8d37-4da3-8419-f88527bec42c"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "930103a4-f39c-429b-aa7e-a361d5cfd000"
},
"type": "invoiceitem.created"
},
@@ -610,7 +610,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
+ "default_payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"footer": null,
"rendering_options": null
},
@@ -633,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbi1DEQaroqDjsXdeqgAlj",
+ "id": "evt_1ODgf2DEQaroqDjsZ5naO5D4",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0015",
- "idempotency_key": "0c3943d4-8d37-4da3-8419-f88527bec42c"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "930103a4-f39c-429b-aa7e-a361d5cfd000"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.8.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.7.json
similarity index 59%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.8.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.7.json
index 0c046ec1d2e..2527add5d53 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.8.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.7.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -111,8 +111,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -127,7 +127,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -157,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,239 +210,16 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbi5DEQaroqDjssKILod24",
+ "id": "evt_1ODgf4DEQaroqDjstyqrYibR",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "ae809e85-ee29-4758-8e0e-ee880812060c"
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbi4DEQaroqDjsdx4qZsUI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 1,
- "request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "ae809e85-ee29-4758-8e0e-ee880812060c"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.paid"
},
@@ -492,9 +269,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -507,8 +284,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -557,8 +334,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -573,7 +350,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -603,12 +380,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -656,16 +433,16 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbi4DEQaroqDjsGqK6ROjG",
+ "id": "evt_1ODgf4DEQaroqDjsmueYQh1U",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "ae809e85-ee29-4758-8e0e-ee880812060c"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.finalized"
}
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.8.json
similarity index 93%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.8.json
index 02f0d7a26b6..0a18f0320a9 100644
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.8.json
@@ -27,7 +27,7 @@
"created": 1000000000,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0002",
+ "customer": "cus_NORMALIZED0001",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqR2NXRUhCcElNVjQxUkMxTVhsa3NTaTNqVklULDkwMDkwMTMz0200p4BwL0Y9/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAy0200aZuMslxg/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -162,7 +162,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,21 +210,21 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbcPDEQaroqDjsb2wdOfq8",
+ "id": "evt_1ODgf4DEQaroqDjs55GWspZ0",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0001",
- "idempotency_key": "2541b338-2700-4407-bd3e-79c1c2740aca"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8eff13cd-e215-4ecc-a1ea-27801c8e1625"
},
"type": "invoice.payment_succeeded"
}
],
- "has_more": true,
+ "has_more": false,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.3.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.9.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.3.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Event.list.9.json
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.create.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.create.1.json
similarity index 93%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.create.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.create.1.json
index a5ad273d45f..dba53250fa5 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.create.1.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,7 +121,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.finalize_invoice.1.json
similarity index 89%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.finalize_invoice.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.finalize_invoice.1.json
index c3e6ff6060c..63345df9dcd 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg002007zGfSRrw/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAx0200QQfMKIqx?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWs5UlR4MHZObFRuejNDbzZZcm9xZ08zcmNhMThNLDkwODI0NTAx0200QQfMKIqx/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,7 +121,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -151,12 +151,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.list.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.list.1.json
new file mode 100644
index 00000000000..e39960ab725
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--Invoice.list.1.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/invoices"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--InvoiceItem.create.1.json
similarity index 92%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.create.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--InvoiceItem.create.1.json
index fb863126d8c..fcb1c3c2e9d 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,7 +22,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--InvoiceItem.create.2.json
similarity index 96%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.create.2.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--InvoiceItem.create.2.json
index 1c02a935fc3..23f69ee2e0c 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--InvoiceItem.create.2.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--PaymentIntent.create.1.json
similarity index 94%
rename from corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.confirm.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--PaymentIntent.create.1.json
index d22230d62ba..593eda7c96c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.confirm.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--PaymentIntent.create.1.json
@@ -76,7 +76,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -92,7 +92,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000003",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -118,7 +118,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKCitKoGMgaKQAuOUZQ6LBbpYXawP1PoCTnM3ZI4C2_ETWnEWXAwhpjzIsxQv8ljuo9pC-FDNHrKYcnd",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLCK4aoGMgZC85PPqHo6LBYZVeEA3rMTAkBiB9vE6fVOfhDvS2nvxcBGt_z31uqXc7lIFUd7QGHlp9C-",
"refunded": false,
"refunds": {
"data": [],
@@ -143,7 +143,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_FMamuhfswU7t4Hoq7dbK49WgR",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_DgL6bvWBybLYhTrU6NPOlBXFn",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -170,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.confirm.2.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--PaymentIntent.create.2.json
similarity index 94%
rename from corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.confirm.2.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--PaymentIntent.create.2.json
index e4f711285ce..2b2db872915 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.confirm.2.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--PaymentIntent.create.2.json
@@ -76,7 +76,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbiYDEQaroqDjsPhGYMLFj",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -118,7 +118,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJOktKoGMgY0yR1SAus6LBYV_Hf0tRsi2qLm779D1wBRpXc-VW3hxlXl2V20ZqP7egSj29z33NPYaScl",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLKK4aoGMgYyVtlocO46LBbdhodN909HzNf9H7V3hMercpJTnqj3mNeLVRs2YhzdYvdeCWFk0gzMMoB1",
"refunded": false,
"refunds": {
"data": [],
@@ -143,7 +143,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_7Ft1BJELt5zuvUeHIaD28tuzR",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_xrY8vVEoYQG7bgmqqnsQxiNF6",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -170,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiYDEQaroqDjsPhGYMLFj",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.create.1.json
similarity index 74%
rename from corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.create.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.create.1.json
index f456ceb1345..d624072b605 100644
--- a/corporate/tests/stripe_fixtures/checkout_session_completed_with_uncaught_exception--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbcWDEQaroqDjsMCHTAw0x_secret_OyYkEf6WNCBG2qkcM9lqdKLG96dBJrV",
+ "client_secret": "seti_1ODgetDEQaroqDjsZjSE0U5U_secret_P1k9PPYFcY8Sa5fTvFUpYSfgvmS5nyO",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbcWDEQaroqDjsMCHTAw0x",
+ "id": "seti_1ODgetDEQaroqDjsZjSE0U5U",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbcWDEQaroqDjs5g1r0nKs",
+ "latest_attempt": "setatt_1ODgetDEQaroqDjsEaBPWgCR",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbcWDEQaroqDjsRGPmvEws",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.list.2.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.list.1.json
similarity index 87%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.list.2.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.list.1.json
index 61b1a9c3a43..0edaf32ffa0 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.list.2.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbhQDEQaroqDjsU74GPJVF_secret_OyYpt0Yo0sPIinJKv9EjB9bomLrJPtW",
+ "client_secret": "seti_1ODgerDEQaroqDjsaNMvRn0d_secret_P1k9Y79FyaXLtHO4HnyulPeR4dTsGVW",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbhQDEQaroqDjsU74GPJVF",
+ "id": "seti_1ODgerDEQaroqDjsaNMvRn0d",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.retrieve.1.json
similarity index 74%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.create.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.retrieve.1.json
index f159fbc3b9e..d624072b605 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbhGDEQaroqDjsegKKNyrL_secret_OyYo8dY7ibBBHWimdijVhW7YF6C6k2L",
+ "client_secret": "seti_1ODgetDEQaroqDjsZjSE0U5U_secret_P1k9PPYFcY8Sa5fTvFUpYSfgvmS5nyO",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbhGDEQaroqDjsegKKNyrL",
+ "id": "seti_1ODgetDEQaroqDjsZjSE0U5U",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbhGDEQaroqDjsxvtensZL",
+ "latest_attempt": "setatt_1ODgetDEQaroqDjsEaBPWgCR",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
+ "payment_method": "pm_1ODgetDEQaroqDjsBoURlzO2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--checkout.Session.create.1.json
similarity index 77%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.create.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--checkout.Session.create.1.json
index 26df005d203..851e9f02447 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED025cWOFWXZpmKGlNbOsbmzAEUKQKEeHPGMPdJ09UoZ6ODd20",
+ "id": "cs_test_NORMALIZED02Jbcca1oFDIW8GKHE42YP6w41aiPzXtyiVnpO6whSqlBLEH",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbhfDEQaroqDjstzEZ6SMo",
+ "setup_intent": "seti_1ODgerDEQaroqDjsaNMvRn0d",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED025cWOFWXZpmKGlNbOsbmzAEUKQKEeHPGMPdJ09UoZ6ODd20#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02Jbcca1oFDIW8GKHE42YP6w41aiPzXtyiVnpO6whSqlBLEH#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--checkout.Session.list.1.json
similarity index 79%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.list.1.json
rename to corporate/tests/stripe_fixtures/double_payment_for_upgrade--checkout.Session.list.1.json
index 36f6b6f65c9..b18f0e6b453 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/double_payment_for_upgrade--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02cBWru1UzudDAYcuIVD7bQsG82m7jRjDI4IyHK7jQSTfTTA",
+ "id": "cs_test_NORMALIZED02Jbcca1oFDIW8GKHE42YP6w41aiPzXtyiVnpO6whSqlBLEH",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbhEDEQaroqDjsQE4VSJWD",
+ "setup_intent": "seti_1ODgerDEQaroqDjsaNMvRn0d",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02cBWru1UzudDAYcuIVD7bQsG82m7jRjDI4IyHK7jQSTfTTA#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02Jbcca1oFDIW8GKHE42YP6w41aiPzXtyiVnpO6whSqlBLEH#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.1.json
index cd4374c5c30..c6547b86a36 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrMWJWR1lrTTl4ZUN6MjRVamZHTUpmckNDancwLDkwMDkwMTY50200sdUyX0yt?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOXlXRkt5MzRORjBnQzFTSUhWcjFPSjRTT2NkLDkwNzk3MjA50200YGJ2NPPR?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrMWJWR1lrTTl4ZUN6MjRVamZHTUpmckNDancwLDkwMDkwMTY50200sdUyX0yt/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOXlXRkt5MzRORjBnQzFTSUhWcjFPSjRTT2NkLDkwNzk3MjA50200YGJ2NPPR/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.2.json
index 76fc4c3a7db..6305fc54a9d 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrelJxUkdDZUVQUFl3U3FJVGFuNms4S2JsZWxjLDkwMDkwMTcz0200ahJXWPWS?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvY2dvOVVsWUhwMUdZRThMQ05LbHByMU9qMzgxLDkwNzk3MjEy0200ZEQL6SGL?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrelJxUkdDZUVQUFl3U3FJVGFuNms4S2JsZWxjLDkwMDkwMTcz0200ahJXWPWS/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvY2dvOVVsWUhwMUdZRThMQ05LbHByMU9qMzgxLDkwNzk3MjEy0200ZEQL6SGL/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.3.json
index 14362b7c79b..fd10c3e5cb1 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.3.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.3.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrdFQwcmtueklKWUhLTjY4OVoyQld4Z3VSY3VxLDkwMDkwMTc302007hXqykgd?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcFRXNTk3N2lOdlNjc2FNWFFJdHVYaFl5bUw5LDkwNzk3MjE00200LQm4HAva?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrdFQwcmtueklKWUhLTjY4OVoyQld4Z3VSY3VxLDkwMDkwMTc302007hXqykgd/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcFRXNTk3N2lOdlNjc2FNWFFJdHVYaFl5bUw5LDkwNzk3MjE00200LQm4HAva/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.4.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.4.json
index 005b8d172c6..d8fcad733c1 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.4.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.4.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlraENiWnZpaG90akRZNWE0QVFzcTJ0UXlJMTZLLDkwMDkwMTgw0200xHhEQzUj?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvYXIyN3BKNDFEbXZIVmVTNXJwNkpBV2JpRk1rLDkwNzk3MjE20200HfH858XY?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlraENiWnZpaG90akRZNWE0QVFzcTJ0UXlJMTZLLDkwMDkwMTgw0200xHhEQzUj/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvYXIyN3BKNDFEbXZIVmVTNXJwNkpBV2JpRk1rLDkwNzk3MjE20200HfH858XY/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.5.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.5.json
index 8bcf7be7997..9ada85e8602 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.5.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.5.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrUjVXbm82cVJtM1RxQ2FXRWJnUTlicUN6Tk0wLDkwMDkwMTg00200RfzYHriT?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcjd0Z3owZmIxMklIOFhBbFdVMFQxTVlZMmZWLDkwNzk3MjE40200GRL71WPc?s=ap",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrUjVXbm82cVJtM1RxQ2FXRWJnUTlicUN6Tk0wLDkwMDkwMTg00200RfzYHriT/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcjd0Z3owZmIxMklIOFhBbFdVMFQxTVlZMmZWLDkwNzk3MjE40200GRL71WPc/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.6.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.6.json
index f9235f98bfc..0ec037e08a1 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.6.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.6.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrM3BySXBEZ0RvQXliaUdGOHZkSlpxdnFjd0UxLDkwMDkwMTg20200zqjaOcYk?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvd0N3MUpXS1ZXMGdLelhBRkM0cU82ODU4NWp4LDkwNzk3MjIx0200QbwNncrS?s=ap",
"id": "in_NORMALIZED00000000000006",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrM3BySXBEZ0RvQXliaUdGOHZkSlpxdnFjd0UxLDkwMDkwMTg20200zqjaOcYk/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvd0N3MUpXS1ZXMGdLelhBRkM0cU82ODU4NWp4LDkwNzk3MjIx0200QbwNncrS/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.7.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.7.json
index 5a4181c29b6..8f408b07875 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.7.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.7.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrYlBNTkduVm10cVU1SGxRMnhIYjZYbE1HVGNsLDkwMDkwMTkx0200ejhe6x0p?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvakl5NThVWDQ1RG5sUFlBa0Zpa1J3NXE2WURILDkwNzk3MjI0020060kueflN?s=ap",
"id": "in_NORMALIZED00000000000007",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrYlBNTkduVm10cVU1SGxRMnhIYjZYbE1HVGNsLDkwMDkwMTkx0200ejhe6x0p/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvakl5NThVWDQ1RG5sUFlBa0Zpa1J3NXE2WURILDkwNzk3MjI0020060kueflN/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.8.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.8.json
index a472c662f06..7fd8bdfe361 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.8.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.8.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrU0M5a3htcG45YnhpRmtEQ09wdGltRFBTZkhwLDkwMDkwMTkz02005Blu4mAQ?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvanlXeXBJNVVrUmN2UUxBeDJrUzdRVXNXNFI5LDkwNzk3MjI30200vRYyGUVn?s=ap",
"id": "in_NORMALIZED00000000000008",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrU0M5a3htcG45YnhpRmtEQ09wdGltRFBTZkhwLDkwMDkwMTkz02005Blu4mAQ/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvanlXeXBJNVVrUmN2UUxBeDJrUzdRVXNXNFI5LDkwNzk3MjI30200vRYyGUVn/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.2.json
index b880efae323..6af424d6c99 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrMWJWR1lrTTl4ZUN6MjRVamZHTUpmckNDancwLDkwMDkwMTk00200I3SdIMHg?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOXlXRkt5MzRORjBnQzFTSUhWcjFPSjRTT2NkLDkwNzk3MjI30200T967Zo9W?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrMWJWR1lrTTl4ZUN6MjRVamZHTUpmckNDancwLDkwMDkwMTk00200I3SdIMHg/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvOXlXRkt5MzRORjBnQzFTSUhWcjFPSjRTT2NkLDkwNzk3MjI30200T967Zo9W/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.4.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.4.json
index fb5d844b3a5..63ce5a83f97 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrelJxUkdDZUVQUFl3U3FJVGFuNms4S2JsZWxjLDkwMDkwMTk102001MqQlQnl?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvY2dvOVVsWUhwMUdZRThMQ05LbHByMU9qMzgxLDkwNzk3MjI40200PElWRyWq?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrelJxUkdDZUVQUFl3U3FJVGFuNms4S2JsZWxjLDkwMDkwMTk102001MqQlQnl/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvY2dvOVVsWUhwMUdZRThMQ05LbHByMU9qMzgxLDkwNzk3MjI40200PElWRyWq/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.5.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.5.json
index 118455ed71f..d0335f5f0e5 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.5.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.5.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlraENiWnZpaG90akRZNWE0QVFzcTJ0UXlJMTZLLDkwMDkwMTk10200j01JBJnc?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvYXIyN3BKNDFEbXZIVmVTNXJwNkpBV2JpRk1rLDkwNzk3MjI402006wxrWPOj?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlraENiWnZpaG90akRZNWE0QVFzcTJ0UXlJMTZLLDkwMDkwMTk10200j01JBJnc/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvYXIyN3BKNDFEbXZIVmVTNXJwNkpBV2JpRk1rLDkwNzk3MjI402006wxrWPOj/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrdFQwcmtueklKWUhLTjY4OVoyQld4Z3VSY3VxLDkwMDkwMTk102004cSiWVhM?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcFRXNTk3N2lOdlNjc2FNWFFJdHVYaFl5bUw5LDkwNzk3MjI40200vtDT9cyt?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrdFQwcmtueklKWUhLTjY4OVoyQld4Z3VSY3VxLDkwMDkwMTk102004cSiWVhM/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcFRXNTk3N2lOdlNjc2FNWFFJdHVYaFl5bUw5LDkwNzk3MjI40200vtDT9cyt/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.6.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.6.json
index 9c4bece3a03..a35013d254c 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.6.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.list.6.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrM3BySXBEZ0RvQXliaUdGOHZkSlpxdnFjd0UxLDkwMDkwMTk20200nDVpRq5S?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvd0N3MUpXS1ZXMGdLelhBRkM0cU82ODU4NWp4LDkwNzk3MjI50200wHk0W9t2?s=ap",
"id": "in_NORMALIZED00000000000006",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrM3BySXBEZ0RvQXliaUdGOHZkSlpxdnFjd0UxLDkwMDkwMTk20200nDVpRq5S/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvd0N3MUpXS1ZXMGdLelhBRkM0cU82ODU4NWp4LDkwNzk3MjI50200wHk0W9t2/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrUjVXbm82cVJtM1RxQ2FXRWJnUTlicUN6Tk0wLDkwMDkwMTk20200hUyMTjZy?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcjd0Z3owZmIxMklIOFhBbFdVMFQxTVlZMmZWLDkwNzk3MjI50200U9bDJ2Pr?s=ap",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrUjVXbm82cVJtM1RxQ2FXRWJnUTlicUN6Tk0wLDkwMDkwMTk20200hUyMTjZy/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcjd0Z3owZmIxMklIOFhBbFdVMFQxTVlZMmZWLDkwNzk3MjI50200U9bDJ2Pr/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.1.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.1.json
index fe1511c188d..70810b6edd2 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.1.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrUjVXbm82cVJtM1RxQ2FXRWJnUTlicUN6Tk0wLDkwMDkwMTg302007JN7UvdA?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcjd0Z3owZmIxMklIOFhBbFdVMFQxTVlZMmZWLDkwNzk3MjIx0200y4u4ThYo?s=ap",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrUjVXbm82cVJtM1RxQ2FXRWJnUTlicUN6Tk0wLDkwMDkwMTg302007JN7UvdA/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvcjd0Z3owZmIxMklIOFhBbFdVMFQxTVlZMmZWLDkwNzk3MjIx0200y4u4ThYo/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.2.json
index 21c228d98fd..2f7bf65b505 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.2.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.pay.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrM3BySXBEZ0RvQXliaUdGOHZkSlpxdnFjd0UxLDkwMDkwMTg30200fOsVhIqX?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvd0N3MUpXS1ZXMGdLelhBRkM0cU82ODU4NWp4LDkwNzk3MjIy0200yzEhcBwo?s=ap",
"id": "in_NORMALIZED00000000000006",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrM3BySXBEZ0RvQXliaUdGOHZkSlpxdnFjd0UxLDkwMDkwMTg30200fOsVhIqX/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvd0N3MUpXS1ZXMGdLelhBRkM0cU82ODU4NWp4LDkwNzk3MjIy0200yzEhcBwo/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Event.list.1.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Event.list.1.json
index 8580e30247b..923bb85e6ed 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Event.list.1.json
@@ -5,90 +5,165 @@
"created": 1000000000,
"data": {
"object": {
- "after_expiration": null,
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 7200,
+ "amount_paid": 0,
+ "amount_remaining": 7200,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": false,
+ "auto_advance": true,
"automatic_tax": {
"enabled": false,
"status": null
},
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "client_secret": null,
- "consent": null,
- "consent_collection": null,
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "send_invoice",
"created": 1000000000,
- "currency": null,
- "currency_conversion": null,
- "custom_fields": [],
- "custom_text": {
- "shipping_address": null,
- "submit": null,
- "terms_of_service_acceptance": null
- },
+ "currency": "usd",
+ "custom_fields": null,
"customer": "cus_NORMALIZED0002",
- "customer_creation": null,
- "customer_details": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "tax_exempt": null,
- "tax_ids": null
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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": 1000000000,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNiamVvamNtMWo5Q3I4RVR0cDNxZmxlSjlYeFlULDkwNzk2NDYw02005SuvDQni?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNiamVvamNtMWo5Q3I4RVR0cDNxZmxlSjlYeFlULDkwNzk2NDYw02005SuvDQni/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 14400,
+ "amount_excluding_tax": 14400,
+ "currency": "usd",
+ "description": "Zulip Plus - renewal",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1600,
+ "unit_amount_decimal": "1600"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 9,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "1600"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 1,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
- "customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED01FtC8Y9m0yUrClzG0sf3XqCiNhQAif8HaIrWUHbnEnNgU48",
- "invoice": null,
- "invoice_creation": null,
"livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "plan_tier": "1",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": false,
+ "paid_out_of_band": false,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
},
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_link": null,
- "payment_method_collection": "always",
- "payment_method_configuration_details": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "phone_number_collection": {
- "enabled": false
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": -7200,
+ "statement_descriptor": "Zulip Plus",
+ "status": "open",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": null,
+ "voided_at": null
},
- "recovered_from": null,
- "setup_intent": "seti_1OAF6wDEQaroqDjs9F4QmA2H",
- "shipping": null,
- "shipping_address_collection": null,
- "shipping_options": [],
- "shipping_rate": null,
- "status": "expired",
- "submit_type": null,
"subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "ui_mode": "hosted",
- "url": null
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 14400,
+ "subtotal_excluding_tax": 14400,
+ "tax": null,
+ "test_clock": null,
+ "total": 14400,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 14400,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
},
- "id": "evt_1OAbaVDEQaroqDjsCrp28Jbm",
+ "id": "evt_1ODZMmDEQaroqDjsNuCDHeFl",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
@@ -96,7 +171,7 @@
"id": null,
"idempotency_key": null
},
- "type": "checkout.session.expired"
+ "type": "invoice.sent"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.1.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.1.json
index 6b558b05f4a..12f7fe2ce30 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.1.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000001",
+ "id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,7 +101,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.2.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.2.json
index ef560fdc82e..b1ce9383d78 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.create.2.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000003",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,7 +101,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.1.json
index 7f9c332aeca..49ee76cadd1 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqN3VHVWxGOTh4RDBrdXgzTzlYVXNybWd1Rnh4LDkwMDkwMDg30200xVQMAxAE?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqN3VHVWxGOTh4RDBrdXgzTzlYVXNybWd1Rnh4LDkwMDkwMDg30200xVQMAxAE/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNubnI5aW40RElsVndNQTdkV0htSnhQalo4ZU5lLDkwNzk3MTIy0200MkrYOhi9?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNubnI5aW40RElsVndNQTdkV0htSnhQalo4ZU5lLDkwNzk3MTIy0200MkrYOhi9/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,17 +101,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -154,5 +154,5 @@
"total_excluding_tax": 984000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.2.json
index 99fc07cf2dd..cfeb099ec36 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqdU1ZMUdFamZOY244WFBJcU8waWZtTlhnZU5sLDkwMDkwMDkw0200fePbVeFg?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqdU1ZMUdFamZOY244WFBJcU8waWZtTlhnZU5sLDkwMDkwMDkw0200fePbVeFg/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuTU1vd2EwbUhvOXNCcHMwYWE5MWVrOXZVcXRCLDkwNzk3MTI00200Qs766B5s?s=ap",
+ "id": "in_NORMALIZED00000000000003",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuTU1vd2EwbUhvOXNCcHMwYWE5MWVrOXZVcXRCLDkwNzk3MTI00200Qs766B5s/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,17 +101,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.list.1.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.list.1.json
index c8f213bfbb3..c3887e6f03f 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Invoice.list.1.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqdU1ZMUdFamZOY244WFBJcU8waWZtTlhnZU5sLDkwMDkwMDky0200H7ROrZEy?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqdU1ZMUdFamZOY244WFBJcU8waWZtTlhnZU5sLDkwMDkwMDky0200H7ROrZEy/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuTU1vd2EwbUhvOXNCcHMwYWE5MWVrOXZVcXRCLDkwNzk3MTI10200kJYsOWcJ?s=ap",
+ "id": "in_NORMALIZED00000000000003",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuTU1vd2EwbUhvOXNCcHMwYWE5MWVrOXZVcXRCLDkwNzk3MTI10200kJYsOWcJ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -57,8 +57,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -73,13 +73,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -103,17 +103,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -156,7 +156,7 @@
"total_excluding_tax": 100,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqN3VHVWxGOTh4RDBrdXgzTzlYVXNybWd1Rnh4LDkwMDkwMDky02006B2TUE21?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlqN3VHVWxGOTh4RDBrdXgzTzlYVXNybWd1Rnh4LDkwMDkwMDky02006B2TUE21/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNubnI5aW40RElsVndNQTdkV0htSnhQalo4ZU5lLDkwNzk3MTI10200kvxUO7KR?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNubnI5aW40RElsVndNQTdkV0htSnhQalo4ZU5lLDkwNzk3MTI10200kvxUO7KR/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -215,8 +215,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -231,13 +231,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -261,17 +261,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.1.json
index 4410192571c..f9763e6d866 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.2.json
index 9e319eb4343..1ae1623514e 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--InvoiceItem.create.2.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard - renewal",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.modify.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.modify.1.json
index 716f46f27f0..201b5654d89 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "default_payment_method": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.1.json
index 87ad38f284e..c9219e149c0 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.1.json
@@ -13,53 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
+ "default_payment_method": null,
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.2.json
index 87ad38f284e..d8add9769b3 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.2.json
@@ -54,7 +54,7 @@
},
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.3.json
index 87ad38f284e..d8add9769b3 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.3.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.3.json
@@ -54,7 +54,7 @@
},
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.4.json
index 87ad38f284e..d8add9769b3 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.4.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.4.json
@@ -54,7 +54,7 @@
},
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.5.json
new file mode 100644
index 00000000000..d8add9769b3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.6.json
new file mode 100644
index 00000000000..d8add9769b3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.7.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.7.json
new file mode 100644
index 00000000000..d8add9769b3
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.7.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.8.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.8.json
new file mode 100644
index 00000000000..1533b749e37
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.retrieve.8.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZDDEQaroqDjsy9N9L24T",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 4,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.1.json
index a46746dfbf3..15d833029cd 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.1.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrU0M5a3htcG45YnhpRmtEQ09wdGltRFBTZkhwLDkwMDkwMTk002005eeFCgEy?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvanlXeXBJNVVrUmN2UUxBeDJrUzdRVXNXNFI5LDkwNzk3MjI30200vRYyGUVn?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlrU0M5a3htcG45YnhpRmtEQ09wdGltRFBTZkhwLDkwMDkwMTk002005eeFCgEy/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNvanlXeXBJNVVrUmN2UUxBeDJrUzdRVXNXNFI5LDkwNzk3MjI30200vRYyGUVn/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -160,16 +160,16 @@
"total_excluding_tax": 10000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
},
- "id": "evt_1OAbdODEQaroqDjsda9t35kS",
+ "id": "evt_1ODZZ9DEQaroqDjsVhyXYGlH",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "cb8e2bf8-c136-4983-84f0-6251b6b130c1"
+ "idempotency_key": "0b8cc064-2230-4579-9344-6b5f6283f29e"
},
"type": "invoice.finalized"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.2.json
index 4e5368feb8a..86ae83a39b0 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Event.list.2.json
@@ -19,7 +19,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "default_payment_method": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"footer": null,
"rendering_options": null
},
@@ -43,275 +43,18 @@
}
}
},
- "id": "evt_1OAbdZDEQaroqDjslq1Rx7TW",
+ "id": "evt_1ODZZFDEQaroqDjs9q7kqahP",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "28e15c08-59bb-4893-809b-fb5a559f65ac"
+ "idempotency_key": "fee1ffe0-8f58-4217-9047-8d1073e34013"
},
"type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbdVDEQaroqDjsFzKSFAPe_secret_OyYlOF4Dj7Eir4H8YcuaeGzBBGreIUL",
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbdVDEQaroqDjsFzKSFAPe",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbdVDEQaroqDjsRNc8UtH4",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbdWDEQaroqDjsSrOFiGcG",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "f0a4d121-309d-407f-8988-35af7fead167"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbdWDEQaroqDjswsF7cyTT",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "f0a4d121-309d-407f-8988-35af7fead167"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbdVDEQaroqDjsFzKSFAPe_secret_OyYlOF4Dj7Eir4H8YcuaeGzBBGreIUL",
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbdVDEQaroqDjsFzKSFAPe",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbdVDEQaroqDjsRNc8UtH4",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbdWDEQaroqDjsgc9XSpBY",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "f0a4d121-309d-407f-8988-35af7fead167"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000001,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbdTDEQaroqDjszzu69nWM_secret_OyYkPcjacAD4sCmlMsYTHFlxUpvKZbL",
- "created": 1010000001,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbdTDEQaroqDjszzu69nWM",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbdUDEQaroqDjs2otqAugB",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2ca2ebce-a198-4e28-85b8-a89dcfd45bf0"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000001,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000001,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbdTDEQaroqDjs0qXEDghU",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "ea6f0c85-be35-4e65-9098-3c0853b9828c"
- },
- "type": "customer.created"
}
],
- "has_more": false,
+ "has_more": true,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.1.json
index 778dfd9b361..4828b8e9dce 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjEz0200hLIdowVJ?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjM40200Y1e9HcMc?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjEz0200hLIdowVJ/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjM40200Y1e9HcMc/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 120000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.2.json
index be2db33d6f5..9670d07f714 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlseDVEd2pVQjRpZjZLaktBNGZJNHRKZlRaZ29TLDkwMDkwMjE30200K3tpa8gk?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwRHJmVDlLS3ROclA3VGJRaUUySXlpY0UxQ0d2LDkwNzk3MjQw0200byW1n7IF?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlseDVEd2pVQjRpZjZLaktBNGZJNHRKZlRaZ29TLDkwMDkwMjE30200K3tpa8gk/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwRHJmVDlLS3ROclA3VGJRaUUySXlpY0UxQ0d2LDkwNzk3MjQw0200byW1n7IF/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 5172,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.3.json
index f45beb72faf..be05bd59758 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.3.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.finalize_invoice.3.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsSW1IT2IyY2lrVmFzSFZkQlVDNUw0MUViRHBULDkwMDkwMjIx0200eLUZ5UY1?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwZDNzc2xzWWl4clkwT3Q5cDBRMHNzTVdmVm1xLDkwNzk3MjQz0200l5bqxewU?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsSW1IT2IyY2lrVmFzSFZkQlVDNUw0MUViRHBULDkwMDkwMjIx0200eLUZ5UY1/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwZDNzc2xzWWl4clkwT3Q5cDBRMHNzTVdmVm1xLDkwNzk3MjQz0200l5bqxewU/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 152000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.4.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.4.json
index 755b61b23f3..3b531a004e0 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjE00200jb9plDsi?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjM50200sOImbstn?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjE00200jb9plDsi/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjM50200sOImbstn/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 120000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.5.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.5.json
index 755b61b23f3..3b531a004e0 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.5.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.5.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjE00200jb9plDsi?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjM50200sOImbstn?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjE00200jb9plDsi/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjM50200sOImbstn/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 120000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.6.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.6.json
index 401bedcba21..b02ea3a084e 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.6.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.6.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlseDVEd2pVQjRpZjZLaktBNGZJNHRKZlRaZ29TLDkwMDkwMjE40200vSdCrolO?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwRHJmVDlLS3ROclA3VGJRaUUySXlpY0UxQ0d2LDkwNzk3MjQx0200A6YQK1tB?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlseDVEd2pVQjRpZjZLaktBNGZJNHRKZlRaZ29TLDkwMDkwMjE40200vSdCrolO/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwRHJmVDlLS3ROclA3VGJRaUUySXlpY0UxQ0d2LDkwNzk3MjQx0200A6YQK1tB/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 5172,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjE40200L3pUnI0P?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjQx0200i6l60Ehk?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjE40200L3pUnI0P/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjQx0200i6l60Ehk/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.7.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.7.json
index 5981d9c4f66..51de7df7e0c 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.7.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.7.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsSW1IT2IyY2lrVmFzSFZkQlVDNUw0MUViRHBULDkwMDkwMjIy0200tn8NE7UO?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwZDNzc2xzWWl4clkwT3Q5cDBRMHNzTVdmVm1xLDkwNzk3MjQz0200l5bqxewU?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsSW1IT2IyY2lrVmFzSFZkQlVDNUw0MUViRHBULDkwMDkwMjIy0200tn8NE7UO/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwZDNzc2xzWWl4clkwT3Q5cDBRMHNzTVdmVm1xLDkwNzk3MjQz0200l5bqxewU/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 152000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlseDVEd2pVQjRpZjZLaktBNGZJNHRKZlRaZ29TLDkwMDkwMjIy0200KbnYVmoK?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwRHJmVDlLS3ROclA3VGJRaUUySXlpY0UxQ0d2LDkwNzk3MjQz0200P8WRLPwd?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlseDVEd2pVQjRpZjZLaktBNGZJNHRKZlRaZ29TLDkwMDkwMjIy0200KbnYVmoK/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwRHJmVDlLS3ROclA3VGJRaUUySXlpY0UxQ0d2LDkwNzk3MjQz0200P8WRLPwd/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -358,9 +358,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjIy0200T2I0V4oN?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjQz02006iIbCg1m?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYktETWdsbTk5cEEzMUwxR1dMZTJvbFVURGZ6LDkwMDkwMjIy0200T2I0V4oN/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwNzk3MjQz02006iIbCg1m/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.create.1.json
index 21042fedbba..252871e3d1c 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbdVDEQaroqDjsFzKSFAPe_secret_OyYlOF4Dj7Eir4H8YcuaeGzBBGreIUL",
+ "client_secret": "seti_1ODZZDDEQaroqDjshPWiIDmB_secret_P1co7GOOMI1qMYC7UnFppZbYxPwDRcw",
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbdVDEQaroqDjsFzKSFAPe",
+ "id": "seti_1ODZZDDEQaroqDjshPWiIDmB",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbdVDEQaroqDjsRNc8UtH4",
+ "latest_attempt": "setatt_1ODZZDDEQaroqDjsd73u0g05",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "payment_method": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.list.1.json
index 5fa00a75395..192f1e48137 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbdTDEQaroqDjszzu69nWM_secret_OyYkPcjacAD4sCmlMsYTHFlxUpvKZbL",
- "created": 1010000001,
+ "client_secret": "seti_1ODZZDDEQaroqDjs86NpDvsN_secret_P1coATg2bExfOZOVSok6GD5GXUxE7qZ",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbdTDEQaroqDjszzu69nWM",
+ "id": "seti_1ODZZDDEQaroqDjs86NpDvsN",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.retrieve.1.json
index 21042fedbba..252871e3d1c 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbdVDEQaroqDjsFzKSFAPe_secret_OyYlOF4Dj7Eir4H8YcuaeGzBBGreIUL",
+ "client_secret": "seti_1ODZZDDEQaroqDjshPWiIDmB_secret_P1co7GOOMI1qMYC7UnFppZbYxPwDRcw",
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbdVDEQaroqDjsFzKSFAPe",
+ "id": "seti_1ODZZDDEQaroqDjshPWiIDmB",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbdVDEQaroqDjsRNc8UtH4",
+ "latest_attempt": "setatt_1ODZZDDEQaroqDjsd73u0g05",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbdVDEQaroqDjsOzvEMpeM",
+ "payment_method": "pm_1ODZZDDEQaroqDjsy9N9L24T",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.create.1.json
index 9c3c04a792d..d3f7268e61b 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000001,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02XRjcyEdbY7zk0rIlQdWl6RximAf4cHbVZ0siE4X5HwuLv0",
+ "id": "cs_test_NORMALIZED02l34FnA2jpyIRTkan1exA0CUZbDnrZCfTzRfPuxlVmqeJXA",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbdTDEQaroqDjszzu69nWM",
+ "setup_intent": "seti_1ODZZDDEQaroqDjs86NpDvsN",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02XRjcyEdbY7zk0rIlQdWl6RximAf4cHbVZ0siE4X5HwuLv0#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02l34FnA2jpyIRTkan1exA0CUZbDnrZCfTzRfPuxlVmqeJXA#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.list.1.json
index fc453ce83d2..fcab5caab4e 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000001,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02XRjcyEdbY7zk0rIlQdWl6RximAf4cHbVZ0siE4X5HwuLv0",
+ "id": "cs_test_NORMALIZED02l34FnA2jpyIRTkan1exA0CUZbDnrZCfTzRfPuxlVmqeJXA",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbdTDEQaroqDjszzu69nWM",
+ "setup_intent": "seti_1ODZZDDEQaroqDjs86NpDvsN",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02XRjcyEdbY7zk0rIlQdWl6RximAf4cHbVZ0siE4X5HwuLv0#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02l34FnA2jpyIRTkan1exA0CUZbDnrZCfTzRfPuxlVmqeJXA#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.modify.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.modify.1.json
index b3bb41d5cdf..c0e16c97b3c 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
+ "default_payment_method": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.1.json
index d52cf6b1d09..560122bcb6f 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.1.json
@@ -54,7 +54,7 @@
},
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdvDEQaroqDjsZI4csghA",
+ "id": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.2.json
new file mode 100644
index 00000000000..560122bcb6f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.3.json
new file mode 100644
index 00000000000..560122bcb6f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.4.json
new file mode 100644
index 00000000000..560122bcb6f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.1.json
index 16bd8b1a9f1..633af4469b9 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.1.json
@@ -5,173 +5,53 @@
"created": 1010000003,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 984000,
- "amount_paid": 0,
- "amount_remaining": 984000,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1010000004,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqN3VHVWxGOTh4RDBrdXgzTzlYVXNybWd1Rnh4LDkwMDkwMjIx0200cSxWJ9F8?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqN3VHVWxGOTh4RDBrdXgzTzlYVXNybWd1Rnh4LDkwMDkwMjIx0200cSxWJ9F8/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 984000,
- "amount_excluding_tax": 984000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000005,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 123,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 984000,
- "subtotal_excluding_tax": 984000,
- "tax": null,
- "test_clock": null,
- "total": 984000,
- "total_discount_amounts": [],
- "total_excluding_tax": 984000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbdpDEQaroqDjsX7j4iGuK",
+ "id": "evt_1ODZZTDEQaroqDjsBshgdIJc",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": null,
- "idempotency_key": null
+ "id": "req_NORMALIZED0001",
+ "idempotency_key": "5e353503-ef30-46b4-bfeb-f5428920ad7b"
},
- "type": "invoice.sent"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.2.json
deleted file mode 100644
index 14c792ba990..00000000000
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--Event.list.2.json
+++ /dev/null
@@ -1,317 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1010000006,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000001,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbdxDEQaroqDjs9sT3nFdj",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0001",
- "idempotency_key": "b3fa363d-ad43-4674-b71e-ba3afa3818cf"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbdvDEQaroqDjsLtM7XeR2_secret_OyYl13wCY3CXPcylGH8IJ3n2W7vyW7N",
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbdvDEQaroqDjsLtM7XeR2",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbdvDEQaroqDjsyw01DWBo",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbdwDEQaroqDjsJN7Wq9kY",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "c14bb11e-7cca-4998-813e-514791ae4164"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbdvDEQaroqDjsZI4csghA",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbdvDEQaroqDjscrmRmZfP",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "c14bb11e-7cca-4998-813e-514791ae4164"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbdvDEQaroqDjsLtM7XeR2_secret_OyYl13wCY3CXPcylGH8IJ3n2W7vyW7N",
- "created": 1010000002,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbdvDEQaroqDjsLtM7XeR2",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbdvDEQaroqDjsyw01DWBo",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbdvDEQaroqDjspJ1TR3Wq",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "c14bb11e-7cca-4998-813e-514791ae4164"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000007,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbduDEQaroqDjsRJcj8xNk_secret_OyYltHCTB8MTo0cyEYeJO8hDzBGIhwS",
- "created": 1010000007,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbduDEQaroqDjsRJcj8xNk",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbduDEQaroqDjsOS0N94QE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "280d4f32-6c31-4131-b8de-b0c089867b02"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000001,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000001,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbdtDEQaroqDjsh1S2sefM",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "269ed71b-b5b8-49bd-ad20-196a9e64f1d2"
- },
- "type": "customer.created"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.create.1.json
index d1787a88ab6..dd18e456fcb 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbdvDEQaroqDjsLtM7XeR2_secret_OyYl13wCY3CXPcylGH8IJ3n2W7vyW7N",
+ "client_secret": "seti_1ODZZRDEQaroqDjskV2dJcGP_secret_P1cpSESeM1nG22EH125PZvuHAYVoUFb",
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbdvDEQaroqDjsLtM7XeR2",
+ "id": "seti_1ODZZRDEQaroqDjskV2dJcGP",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbdvDEQaroqDjsyw01DWBo",
+ "latest_attempt": "setatt_1ODZZRDEQaroqDjsCfInjHwO",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
+ "payment_method": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.list.1.json
index 626e4333172..bcbbb6a78f7 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbduDEQaroqDjsRJcj8xNk_secret_OyYltHCTB8MTo0cyEYeJO8hDzBGIhwS",
- "created": 1010000007,
+ "client_secret": "seti_1ODZZRDEQaroqDjsKRr7mIAj_secret_P1cpnZKQuyuH3xAJUfmHjIGbVXARLYL",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbduDEQaroqDjsRJcj8xNk",
+ "id": "seti_1ODZZRDEQaroqDjsKRr7mIAj",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.retrieve.1.json
index d1787a88ab6..dd18e456fcb 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbdvDEQaroqDjsLtM7XeR2_secret_OyYl13wCY3CXPcylGH8IJ3n2W7vyW7N",
+ "client_secret": "seti_1ODZZRDEQaroqDjskV2dJcGP_secret_P1cpSESeM1nG22EH125PZvuHAYVoUFb",
"created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbdvDEQaroqDjsLtM7XeR2",
+ "id": "seti_1ODZZRDEQaroqDjskV2dJcGP",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbdvDEQaroqDjsyw01DWBo",
+ "latest_attempt": "setatt_1ODZZRDEQaroqDjsCfInjHwO",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
+ "payment_method": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.create.1.json
index ce00d972354..da35654d9a4 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000007,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02e2MHioj8gyomR6XWZfuoN3GuBkGArX3pORLOrT2h2nWHWJ",
+ "id": "cs_test_NORMALIZED01wAeANjIweBWJFUmSkNwS2S59Hyt6pCLi5rgpYr31ncZaBq",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbduDEQaroqDjsRJcj8xNk",
+ "setup_intent": "seti_1ODZZRDEQaroqDjsKRr7mIAj",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02e2MHioj8gyomR6XWZfuoN3GuBkGArX3pORLOrT2h2nWHWJ#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01wAeANjIweBWJFUmSkNwS2S59Hyt6pCLi5rgpYr31ncZaBq#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.list.1.json
index b51ee020e43..3662836ea4c 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card_from_onboarding_page--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000007,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02e2MHioj8gyomR6XWZfuoN3GuBkGArX3pORLOrT2h2nWHWJ",
+ "id": "cs_test_NORMALIZED01wAeANjIweBWJFUmSkNwS2S59Hyt6pCLi5rgpYr31ncZaBq",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbduDEQaroqDjsRJcj8xNk",
+ "setup_intent": "seti_1ODZZRDEQaroqDjsKRr7mIAj",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02e2MHioj8gyomR6XWZfuoN3GuBkGArX3pORLOrT2h2nWHWJ#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01wAeANjIweBWJFUmSkNwS2S59Hyt6pCLi5rgpYr31ncZaBq#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Event.list.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Event.list.1.json
index d67a67e897d..84cda8a96d0 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Event.list.1.json
@@ -19,7 +19,7 @@
"invoice_prefix": "NORMA02",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbdvDEQaroqDjsZI4csghA",
+ "default_payment_method": "pm_1ODZZRDEQaroqDjsrQSLSUaJ",
"footer": null,
"rendering_options": null
},
@@ -43,13 +43,13 @@
}
}
},
- "id": "evt_1OAbdxDEQaroqDjs9sT3nFdj",
+ "id": "evt_1ODZZTDEQaroqDjsBshgdIJc",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "b3fa363d-ad43-4674-b71e-ba3afa3818cf"
+ "idempotency_key": "5e353503-ef30-46b4-bfeb-f5428920ad7b"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.1.json
index 2f380d6de56..6865f52430e 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjM40200yR8fHJ6h?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjUz0200je1KzTmF?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjM40200yR8fHJ6h/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjUz0200je1KzTmF/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 984000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.2.json
index 7c006997b14..07e6e87765a 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsOUF2UjJhNHNwOHRaTUNqclhDZ3ppcEZQQUpnLDkwMDkwMjQ00200TFCon2BH?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwb3RmU2JBVkhwdVpmVzJ5QmNXeTVjZjhGQ1pHLDkwNzk3MjU20200An3wRXZr?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsOUF2UjJhNHNwOHRaTUNqclhDZ3ppcEZQQUpnLDkwMDkwMjQ00200TFCon2BH/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwb3RmU2JBVkhwdVpmVzJ5QmNXeTVjZjhGQ1pHLDkwNzk3MjU20200An3wRXZr/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.2.json
index fdfb81dedfe..f1f3159c141 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQw0200gn5JwMdZ?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjUz0200je1KzTmF?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQw0200gn5JwMdZ/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjUz0200je1KzTmF/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 984000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.3.json
index fdfb81dedfe..cae408c666e 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.3.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQw0200gn5JwMdZ?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjU00200se2MMqIB?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQw0200gn5JwMdZ/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjU00200se2MMqIB/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.4.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.4.json
index 73aa700bff6..cae408c666e 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQy0200XOPm3v30?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjU00200se2MMqIB?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQy0200XOPm3v30/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjU00200se2MMqIB/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.5.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.5.json
index 471f7605f25..45c557091eb 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.5.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.list.5.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsOUF2UjJhNHNwOHRaTUNqclhDZ3ppcEZQQUpnLDkwMDkwMjQ10200Blhz2MVv?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwb3RmU2JBVkhwdVpmVzJ5QmNXeTVjZjhGQ1pHLDkwNzk3MjU20200An3wRXZr?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsOUF2UjJhNHNwOHRaTUNqclhDZ3ppcEZQQUpnLDkwMDkwMjQ10200Blhz2MVv/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwb3RmU2JBVkhwdVpmVzJ5QmNXeTVjZjhGQ1pHLDkwNzk3MjU20200An3wRXZr/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQ10200dthD3a4R?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjU20200ikZBJpT8?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsYU9vSk9HTzFSU3RLUXJ6Z3p3WE1MM2JNdmN4LDkwMDkwMjQ10200dthD3a4R/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQ2tsa2g4bGdNeVo4UjJlS0tPbEdtOHJnalhNLDkwNzk3MjU20200ikZBJpT8/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Customer.modify.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Customer.modify.1.json
index d03d670a138..aeacc8d2388 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
+ "default_payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.1.json
new file mode 100644
index 00000000000..cb31cbe2948
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.2.json
new file mode 100644
index 00000000000..cb31cbe2948
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.3.json
new file mode 100644
index 00000000000..cb31cbe2948
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.4.json
new file mode 100644
index 00000000000..cb31cbe2948
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.1.json
index b168d6e5609..786398e4021 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.1.json
@@ -5,173 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 100,
- "amount_paid": 0,
- "amount_remaining": 100,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
+ "address": null,
+ "balance": 0,
"created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqdU1ZMUdFamZOY244WFBJcU8waWZtTlhnZU5sLDkwMDkwMDkx0200xnm366bt?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqdU1ZMUdFamZOY244WFBJcU8waWZtTlhnZU5sLDkwMDkwMDkx0200xnm366bt/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 100,
- "amount_excluding_tax": 100,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 100,
- "unit_amount_decimal": "100"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "100"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 100,
- "subtotal_excluding_tax": 100,
- "tax": null,
- "test_clock": null,
- "total": 100,
- "total_discount_amounts": [],
- "total_excluding_tax": 100,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbbjDEQaroqDjsasE2tcTx",
+ "id": "evt_1ODZXYDEQaroqDjsI75z8CKm",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "77aea1fa-932d-403e-a6b5-91aefba0f951"
+ "idempotency_key": "e4b554a8-90b7-496d-bd5f-e99c1db73e60"
},
- "type": "invoice.finalized"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.2.json b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.2.json
index c20e3f03726..d32b1cb27e4 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.2.json
@@ -81,8 +81,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPigtKoGMgbsliJAZpA6LBb8xTQKN22WTvwqA49W2dGozq74aVsCL5ZbXdXL9O2EOnaWEZ53kcVwOzBB",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMu036oGMgZOnCOo97M6LBYsE6Em4wkgybij1Hq4ivBpV5IOdoa2cmB-E-ouGSzq2C75IK7Z1Awui46Y",
"refunded": false,
"refunds": {
"data": [],
@@ -147,15 +147,15 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_C0wggh0PtHAQPmkLfqezEIokE",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Vkv9SJdH15S4MRRVrnuPXQuf7",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000001",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbboDEQaroqDjs0jKEgAAR",
+ "id": "evt_3ODZXaDEQaroqDjs17DCYAmx",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "1a480201-f837-496f-b423-2be91309385c"
+ "idempotency_key": "75326cee-1a80-4bab-9717-f13a612cc411"
},
"type": "payment_intent.succeeded"
},
@@ -217,108 +217,13 @@
"created": 1000000000,
"data": {
"object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbbuDEQaroqDjstFN2sdE0",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "d602528b-5375-4149-b43c-11d947625f6c"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
"application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbbrDEQaroqDjsKUbdWWP9_secret_OyYjqosZVDW5SEuTOmVgnfKlHyk2SH1",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbbrDEQaroqDjsKUbdWWP9",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbbrDEQaroqDjsvt6s5eiL",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbbsDEQaroqDjsCMMPtAsI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "67967b7a-9434-4f54-8c7e-64a73dda50de"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
"billing_details": {
"address": {
"city": null,
@@ -332,182 +237,21 @@
"name": null,
"phone": null
},
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbbsDEQaroqDjsuTq9XqUD",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "67967b7a-9434-4f54-8c7e-64a73dda50de"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbbrDEQaroqDjsKUbdWWP9_secret_OyYjqosZVDW5SEuTOmVgnfKlHyk2SH1",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbbrDEQaroqDjsKUbdWWP9",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbbrDEQaroqDjsvt6s5eiL",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbbsDEQaroqDjsAMpFDufI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "67967b7a-9434-4f54-8c7e-64a73dda50de"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbboDEQaroqDjsml7gTqhw_secret_OyYjw6rpQqkWRkLsiIfBwjNg6ZZSsNc",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbboDEQaroqDjsml7gTqhw",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbboDEQaroqDjspa5MCPyY",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "4a38fbd0-3bdf-4d3b-a9b5-28a4d88dc775"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_C0wggh0PtHAQPmkLfqezEIokE",
- "confirmation_method": "automatic",
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
"invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -522,92 +266,90 @@
"user_email": "[email protected]",
"user_id": "10"
},
- "next_action": null,
- "object": "payment_intent",
+ "object": "charge",
"on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "payment_method_details": {
"card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
"installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
},
- "payment_method_types": [
- "card"
- ],
- "processing": null,
"receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMu036oGMgbYx6ADINY6LBYcgkGyVb5p1X_BCaEsbiO5l0kruv8u97eb3gyDY6nGl1IAY7iL4FeB-ypp",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
- "setup_future_usage": null,
"shipping": null,
"source": null,
+ "source_transfer": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
- "id": "evt_3OAbboDEQaroqDjs00vdODqj",
+ "id": "evt_3ODZXaDEQaroqDjs1KNiFhVc",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "e726a635-5fbe-4adc-b06f-5a08279d80df"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbbnDEQaroqDjszj8WV1Qn",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "a65d68cb-3386-4758-bbec-639c56d019ba"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "75326cee-1a80-4bab-9717-f13a612cc411"
},
- "type": "customer.created"
+ "type": "charge.succeeded"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.3.json b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.3.json
index 3227881fcc9..758bd71bf38 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.3.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTEw0200BaMSbv9H?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTEw0200BaMSbv9H/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -111,412 +111,16 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbc2DEQaroqDjsoZbR9Gfw",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "9c3ba16f-d0a0-4e13-a54a-3fa1ec6c1fe0"
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTA502003nKsJUdO?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTA502003nKsJUdO/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
"id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
"period": {
"end": 1000000000,
"start": 1000000000
},
"plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbc1DEQaroqDjsuoeRJ6qy",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "9c3ba16f-d0a0-4e13-a54a-3fa1ec6c1fe0"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTA502003nKsJUdO?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTA502003nKsJUdO/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
@@ -535,56 +139,6 @@
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
"unit_amount": -48000,
"unit_amount_decimal": "-48000"
},
@@ -603,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -656,7 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -680,13 +234,13 @@
}
}
},
- "id": "evt_1OAbc1DEQaroqDjsBEjAw4Vy",
+ "id": "evt_1ODZXeDEQaroqDjsAxatWyim",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "9c3ba16f-d0a0-4e13-a54a-3fa1ec6c1fe0"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "971b3357-e967-421f-a164-32365900a734"
},
"type": "invoice.updated"
},
@@ -737,7 +291,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -751,8 +305,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -767,13 +321,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -801,8 +355,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -817,13 +371,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -847,7 +401,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -903,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbc0DEQaroqDjsueYqVy26",
+ "id": "evt_1ODZXdDEQaroqDjs6KoCwJZZ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "b1435a1d-05f9-4f8a-9531-b3bfba39f1b0"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "6deee6c1-ba34-43e8-b743-5dec550c413c"
},
"type": "invoice.created"
},
@@ -925,7 +479,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -941,13 +495,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -965,13 +519,13 @@
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbbzDEQaroqDjsjUxVzbPW",
+ "id": "evt_1ODZXcDEQaroqDjsn33U19WO",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "0628f7a7-c78a-4db6-a7c4-dbb9c390eeb5"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "c73105b3-8a37-4434-b43f-e52e03e7b38d"
},
"type": "invoiceitem.created"
},
@@ -987,7 +541,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -1003,13 +557,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -1027,13 +581,13 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbbyDEQaroqDjs3Y0lp2d0",
+ "id": "evt_1ODZXcDEQaroqDjsh1nRKIyR",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "6758e4e1-6c87-4dde-b28d-ce8dd475d319"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "c588c09d-069f-42cc-a609-a3bc952022e3"
},
"type": "invoiceitem.created"
},
@@ -1056,7 +610,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
+ "default_payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"footer": null,
"rendering_options": null
},
@@ -1079,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbbyDEQaroqDjs069V90oQ",
+ "id": "evt_1ODZXcDEQaroqDjsTY4Z4XTA",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "6758e4e1-6c87-4dde-b28d-ce8dd475d319"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "c588c09d-069f-42cc-a609-a3bc952022e3"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.4.json b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.4.json
index a4c1962ad1f..102095f1940 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.4.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTEw0200BaMSbv9H?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTEw0200BaMSbv9H/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,6 +71,56 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
@@ -89,6 +139,179 @@
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZXeDEQaroqDjs6ETaKifv",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 2,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "971b3357-e967-421f-a164-32365900a734"
+ },
+ "type": "invoice.paid"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
"unit_amount": 8000,
"unit_amount_decimal": "8000"
},
@@ -111,8 +334,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -127,13 +350,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -157,12 +380,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -210,18 +433,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbc2DEQaroqDjsS2vbkyqG",
+ "id": "evt_1ODZXeDEQaroqDjsG70190la",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "9c3ba16f-d0a0-4e13-a54a-3fa1ec6c1fe0"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "971b3357-e967-421f-a164-32365900a734"
},
- "type": "invoice.payment_succeeded"
+ "type": "invoice.finalized"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.5.json b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.5.json
index 6d922067afe..04f35681d94 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.5.json
@@ -1,5 +1,229 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM002003wdRgodq/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZXeDEQaroqDjseuRy00To",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "971b3357-e967-421f-a164-32365900a734"
+ },
+ "type": "invoice.payment_succeeded"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.9.json b/corporate/tests/stripe_fixtures/invoice_plan--Event.list.6.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.9.json
rename to corporate/tests/stripe_fixtures/invoice_plan--Event.list.6.json
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.1.json
index 3a984f0a8a7..ee4c6393e41 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.1.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.2.json b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.2.json
index f1726c82625..4bbe33b6a1f 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.2.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000003",
+ "id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -155,8 +155,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000006",
- "invoice_item": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000005",
+ "invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -171,7 +171,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000006",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -201,7 +201,7 @@
"has_more": false,
"object": "list",
"total_count": 3,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.1.json
index ba17dd5c0af..748b879b5f4 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTA502003nKsJUdO?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTA502003nKsJUdO/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTMz0200fMzrNaoW?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTMz0200fMzrNaoW/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,12 +151,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.2.json
index 00fe646ae81..c46cfaebea7 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqaGQ3elJQNENCaVZHMVZqdGVyMzFmWFJZck1MLDkwMDkwMTE002002tYuWb47?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqaGQ3elJQNENCaVZHMVZqdGVyMzFmWFJZck1MLDkwMDkwMTE002002tYuWb47/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMWVRbWxCZ3pWYXNyQ2V2Z2ZEd3pYUjg2NVViLDkwNzk3MTM30200HP12spaW?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMWVRbWxCZ3pWYXNyQ2V2Z2ZEd3pYUjg2NVViLDkwNzk3MTM30200HP12spaW/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -155,8 +155,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000006",
- "invoice_item": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000005",
+ "invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -171,7 +171,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000006",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -201,17 +201,17 @@
"has_more": false,
"object": "list",
"total_count": 3,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0004",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -254,5 +254,5 @@
"total_excluding_tax": 80697,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.2.json b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.2.json
index c8cd16dbd21..ed4a96db013 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqaGQ3elJQNENCaVZHMVZqdGVyMzFmWFJZck1MLDkwMDkwMTE10200fmEy57WE?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqaGQ3elJQNENCaVZHMVZqdGVyMzFmWFJZck1MLDkwMDkwMTE10200fmEy57WE/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMWVRbWxCZ3pWYXNyQ2V2Z2ZEd3pYUjg2NVViLDkwNzk3MTM40200tfWGtEQU?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMWVRbWxCZ3pWYXNyQ2V2Z2ZEd3pYUjg2NVViLDkwNzk3MTM40200tfWGtEQU/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -57,8 +57,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -73,13 +73,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -107,8 +107,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -123,13 +123,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -157,8 +157,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000006",
- "invoice_item": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000005",
+ "invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -173,7 +173,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000006",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
@@ -203,17 +203,17 @@
"has_more": false,
"object": "list",
"total_count": 3,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0004",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -256,7 +256,7 @@
"total_excluding_tax": 80697,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -300,9 +300,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTE10200HMidCzV6?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlqRmVIR0Zzd1Npems0dTFHVzQ1TkJwREZwTXhFLDkwMDkwMTE10200HMidCzV6/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM40200xaFajNsJ?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNuMmdEbW5VTzNWS0VISFZrcTZJdldpSVNxSVc0LDkwNzk3MTM40200xaFajNsJ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -315,8 +315,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -331,13 +331,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -365,8 +365,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -381,13 +381,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -411,12 +411,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.1.json
index 8ab094d6ee7..fcb1c3c2e9d 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.2.json
index 14672c900cd..11622f30a73 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.2.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.3.json
index 26d623b9219..631ea304dab 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.3.json
@@ -6,7 +6,7 @@
"description": "Additional license (Apr 11, 2012 - Jan 2, 2013)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000006",
+ "id": "ii_NORMALIZED00000000000005",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,7 +22,7 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000006",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.4.json
index 13032f7c731..baae44446f6 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.4.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard - renewal",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "ii_NORMALIZED00000000000004",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000005",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.5.json b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.5.json
index 5088a2f6612..12c72dfa0a3 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.5.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.5.json
@@ -6,7 +6,7 @@
"description": "Additional license (Feb 5, 2013 - Jan 2, 2014)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000004",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0004",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.confirm.1.json
deleted file mode 100644
index 618f7d5d254..00000000000
--- a/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPigtKoGMgYPDa_mWIQ6LBYwcQS4o72mZhMqXFUMEwOe9-kGTzzM69YFKv8MdWpWOkltraabS9qFJbZY",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_C0wggh0PtHAQPmkLfqezEIokE",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.create.1.json
index 4794e5eba29..81d872c0081 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMu036oGMgZLk11_RfE6LBZCRq3oLAvNdfJEsHOrJ5Ew_bjYwNX5JiPWwKqzZeLVdt3jVfvYIPZVWqK2",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_C0wggh0PtHAQPmkLfqezEIokE",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Vkv9SJdH15S4MRRVrnuPXQuf7",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.create.1.json
index 1c9cb2d3433..ac4e6e13249 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbbrDEQaroqDjsKUbdWWP9_secret_OyYjqosZVDW5SEuTOmVgnfKlHyk2SH1",
+ "client_secret": "seti_1ODZXWDEQaroqDjsq1gjacsL_secret_P1cnpHd6ryRhyxXJOHOoyGPYYoilmPh",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbbrDEQaroqDjsKUbdWWP9",
+ "id": "seti_1ODZXWDEQaroqDjsq1gjacsL",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbbrDEQaroqDjsvt6s5eiL",
+ "latest_attempt": "setatt_1ODZXWDEQaroqDjsH6XTSSQa",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.list.1.json
index 838263ce790..c0cda144459 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbboDEQaroqDjsml7gTqhw_secret_OyYjw6rpQqkWRkLsiIfBwjNg6ZZSsNc",
+ "client_secret": "seti_1ODZXWDEQaroqDjsBY6FJNzy_secret_P1cnbPwlIFXbKCB92bmcLo9NiQbNnjC",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbboDEQaroqDjsml7gTqhw",
+ "id": "seti_1ODZXWDEQaroqDjsBY6FJNzy",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.retrieve.1.json
index 1c9cb2d3433..ac4e6e13249 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbbrDEQaroqDjsKUbdWWP9_secret_OyYjqosZVDW5SEuTOmVgnfKlHyk2SH1",
+ "client_secret": "seti_1ODZXWDEQaroqDjsq1gjacsL_secret_P1cnpHd6ryRhyxXJOHOoyGPYYoilmPh",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbbrDEQaroqDjsKUbdWWP9",
+ "id": "seti_1ODZXWDEQaroqDjsq1gjacsL",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbbrDEQaroqDjsvt6s5eiL",
+ "latest_attempt": "setatt_1ODZXWDEQaroqDjsH6XTSSQa",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbbrDEQaroqDjs2LtkuqxG",
+ "payment_method": "pm_1ODZXWDEQaroqDjsWhE4ZDui",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.create.1.json
index 85159018b54..e513e402533 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02zyJkiyM7dV7twoU4KzbqI1CChWilpFVgUGaqr5VTwJ2vdI",
+ "id": "cs_test_NORMALIZED02POJ4DGuURx2lsNbEDWYIlehNBVT54bbQCQHEWKaPVm1P8Z",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbboDEQaroqDjsml7gTqhw",
+ "setup_intent": "seti_1ODZXWDEQaroqDjsBY6FJNzy",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02zyJkiyM7dV7twoU4KzbqI1CChWilpFVgUGaqr5VTwJ2vdI#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02POJ4DGuURx2lsNbEDWYIlehNBVT54bbQCQHEWKaPVm1P8Z#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.list.1.json
index cb1f655740b..5f1362e1697 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02zyJkiyM7dV7twoU4KzbqI1CChWilpFVgUGaqr5VTwJ2vdI",
+ "id": "cs_test_NORMALIZED02POJ4DGuURx2lsNbEDWYIlehNBVT54bbQCQHEWKaPVm1P8Z",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbboDEQaroqDjsml7gTqhw",
+ "setup_intent": "seti_1ODZXWDEQaroqDjsBY6FJNzy",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02zyJkiyM7dV7twoU4KzbqI1CChWilpFVgUGaqr5VTwJ2vdI#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02POJ4DGuURx2lsNbEDWYIlehNBVT54bbQCQHEWKaPVm1P8Z#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.create.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.create.1.json
index 593a07ed0c8..c9219e149c0 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.create.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"default_currency": null,
"default_source": null,
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.modify.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.modify.1.json
index 45cbeb7b6c9..0b74b3df83a 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.modify.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"default_currency": null,
"default_source": null,
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "default_payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.1.json
new file mode 100644
index 00000000000..854846f86cc
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.2.json
new file mode 100644
index 00000000000..854846f86cc
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.3.json
new file mode 100644
index 00000000000..854846f86cc
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.1.json
index 301da59e589..3f436f6a5b0 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.1.json
@@ -2,176 +2,56 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1010000003,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 984000,
- "amount_paid": 0,
- "amount_remaining": 984000,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsOUF2UjJhNHNwOHRaTUNqclhDZ3ppcEZQQUpnLDkwMDkwMjQ10200Blhz2MVv?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlsOUF2UjJhNHNwOHRaTUNqclhDZ3ppcEZQQUpnLDkwMDkwMjQ10200Blhz2MVv/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 984000,
- "amount_excluding_tax": 984000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1393729445,
- "start": 1362193445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 123,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 984000,
- "subtotal_excluding_tax": 984000,
- "tax": null,
- "test_clock": null,
- "total": 984000,
- "total_discount_amounts": [],
- "total_excluding_tax": 984000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbeDDEQaroqDjsHqUgOFSp",
+ "id": "evt_1ODZZgDEQaroqDjsFzJ8H9d7",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "ca052f03-b7cf-483e-8803-6f311c61c603"
+ "idempotency_key": "4d94520c-fa34-48a3-ae78-e1931bd94299"
},
- "type": "invoice.finalized"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.2.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.2.json
index 9bd3abf358e..636e1ba040b 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.2.json
@@ -2,7 +2,7 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1010000004,
"data": {
"object": {
"amount": 48000,
@@ -42,7 +42,7 @@
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
"captured": true,
- "created": 1000000000,
+ "created": 1010000004,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -81,8 +81,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJCitKoGMgaVCp5A8lk6LBZJ089VnvcciVcR-5LVpyp6z_PbaRNHc-2UxtNYM-jtiehih2fGAaekIO58",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKM-136oGMgZSLWswruA6LBaH0qW7328Vf8JcsmXmwwLdmtie2vjMnceW4m1fzIAc6w2KWB_lr4ATcScW",
"refunded": false,
"refunds": {
"data": [],
@@ -147,15 +147,15 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_EvHp2gH9r4yW7nFcVkx0NwN0G",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_2a4Ddf3htE4dFNr7w88QF7Xdm",
"confirmation_method": "automatic",
- "created": 1000000000,
+ "created": 1010000004,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000001",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,19 +202,19 @@
"transfer_group": null
}
},
- "id": "evt_3OAbeGDEQaroqDjs0LfbUeC0",
+ "id": "evt_3ODZZiDEQaroqDjs0OBBL4AC",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "9b52901c-996a-4937-bc49-76aa11b361ac"
+ "idempotency_key": "4d0e5e72-0e17-42c7-9833-51051ec4c19b"
},
"type": "payment_intent.succeeded"
},
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1010000004,
"data": {
"object": {
"amount": 48000,
@@ -239,7 +239,7 @@
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
"captured": true,
- "created": 1000000000,
+ "created": 1010000004,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -278,8 +278,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJCitKoGMgb7DWZE_q06LBYJ_dQdPUYeBNLNDVyUIBwW1zxMSzkNxGRS_eUTOUAKb7DmG_LIBRnX-2Ru",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKM-136oGMgZ7tsD4XaA6LBbAyffIM8QksduYhSKQZHwNQNAiRv0m7aH2TIf5eQ5tywNCuEbS-GpM5n--",
"refunded": false,
"refunds": {
"data": [],
@@ -341,412 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbeGDEQaroqDjs0UZryhI2",
+ "id": "evt_3ODZZiDEQaroqDjs0VJa89kg",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "9b52901c-996a-4937-bc49-76aa11b361ac"
+ "idempotency_key": "4d0e5e72-0e17-42c7-9833-51051ec4c19b"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbeKDEQaroqDjsZTIjhHBE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "d942cc7e-ee18-451b-ae1c-a4f6752eaaa7"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbeHDEQaroqDjsaqbwmmGd_secret_OyYls1iBwR9QtbDPTjj3Chwq2nO6nif",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbeHDEQaroqDjsaqbwmmGd",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbeHDEQaroqDjs8ePHykf7",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbeIDEQaroqDjsCIPtjXp6",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c7ba63af-2706-4519-bcb4-9c572a119f16"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbeIDEQaroqDjsJ2ZuPSG2",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c7ba63af-2706-4519-bcb4-9c572a119f16"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbeHDEQaroqDjsaqbwmmGd_secret_OyYls1iBwR9QtbDPTjj3Chwq2nO6nif",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbeHDEQaroqDjsaqbwmmGd",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbeHDEQaroqDjs8ePHykf7",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbeIDEQaroqDjsJa5EtHe1",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c7ba63af-2706-4519-bcb4-9c572a119f16"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbeGDEQaroqDjsPngZJnSi_secret_OyYlLqjmlZdmBbbqi48t6ICHPv7kflW",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbeGDEQaroqDjsPngZJnSi",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbeGDEQaroqDjsrQgO8Tup",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "646d907a-e68e-4748-acbb-2d46957a7218"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_EvHp2gH9r4yW7nFcVkx0NwN0G",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbeGDEQaroqDjs0TMxCpVh",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "644130a1-07f7-4436-9cfc-01ce41cd2659"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbeEDEQaroqDjs3cMcAVS1",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "bfcc6082-80ed-483b-90a0-501ff033bc81"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.3.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.3.json
index 950f29116f5..20174820145 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--Event.list.3.json
@@ -2,7 +2,7 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1010000005,
"data": {
"object": {
"amount": -48000,
@@ -12,7 +12,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -25,16 +25,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1000000000,
+ "created": 1010000006,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -52,24 +52,24 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbeRDEQaroqDjsawIQum5g",
+ "id": "evt_1ODZZjDEQaroqDjsOzcnk4la",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "70b8fc3e-7b79-4b6c-ab91-46283adb57f7"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "0d218a9b-9097-47c0-b6bd-a1984b14c826"
},
"type": "invoiceitem.created"
},
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1010000005,
"data": {
"object": {
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": "usd",
"default_currency": "usd",
"default_source": null,
@@ -81,7 +81,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "default_payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"footer": null,
"rendering_options": null
},
@@ -104,13 +104,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbeRDEQaroqDjsTnlAIvSA",
+ "id": "evt_1ODZZjDEQaroqDjs9Abzsig5",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "70b8fc3e-7b79-4b6c-ab91-46283adb57f7"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "0d218a9b-9097-47c0-b6bd-a1984b14c826"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--InvoiceItem.create.1.json
index fcb1c3c2e9d..457258b2d7a 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -19,16 +19,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1000000000,
+ "created": 1010000006,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.confirm.1.json
deleted file mode 100644
index 454802eb221..00000000000
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJCitKoGMgaJUF_sh3w6LBZQkNrnBXAV_Lu8CokbZv6f1017TboM45cs7haUU7of3oSPGtLIFnZC-4yT",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_EvHp2gH9r4yW7nFcVkx0NwN0G",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.create.1.json
index 297411e0825..03efb6a1941 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1010000004,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKM-136oGMgaUhHtcDYI6LBb_IinUJbf9cHuNiZtuK7253jkEFmrRq5GprONJxB_BdvHF7AhE7-xL-6R2",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_EvHp2gH9r4yW7nFcVkx0NwN0G",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_2a4Ddf3htE4dFNr7w88QF7Xdm",
"confirmation_method": "automatic",
- "created": 1000000000,
+ "created": 1010000004,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.create.1.json
index 7764ee9e826..5ac68a5816a 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeHDEQaroqDjsaqbwmmGd_secret_OyYls1iBwR9QtbDPTjj3Chwq2nO6nif",
- "created": 1000000000,
+ "client_secret": "seti_1ODZZeDEQaroqDjsbYVC41jC_secret_P1cpmWT7Ygjhu60kuKKmFrskuexaZ3C",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeHDEQaroqDjsaqbwmmGd",
+ "id": "seti_1ODZZeDEQaroqDjsbYVC41jC",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbeHDEQaroqDjs8ePHykf7",
+ "latest_attempt": "setatt_1ODZZeDEQaroqDjsCaSkfneh",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.list.1.json
index 02158770ea6..ec19efeb6b6 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeGDEQaroqDjsPngZJnSi_secret_OyYlLqjmlZdmBbbqi48t6ICHPv7kflW",
- "created": 1000000000,
+ "client_secret": "seti_1ODZZdDEQaroqDjs4qXCACvq_secret_P1cpashZNKifzLtQqyFYNZb0ew897CU",
+ "created": 1010000001,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeGDEQaroqDjsPngZJnSi",
+ "id": "seti_1ODZZdDEQaroqDjs4qXCACvq",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.retrieve.1.json
index 7764ee9e826..5ac68a5816a 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeHDEQaroqDjsaqbwmmGd_secret_OyYls1iBwR9QtbDPTjj3Chwq2nO6nif",
- "created": 1000000000,
+ "client_secret": "seti_1ODZZeDEQaroqDjsbYVC41jC_secret_P1cpmWT7Ygjhu60kuKKmFrskuexaZ3C",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeHDEQaroqDjsaqbwmmGd",
+ "id": "seti_1ODZZeDEQaroqDjsbYVC41jC",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbeHDEQaroqDjs8ePHykf7",
+ "latest_attempt": "setatt_1ODZZeDEQaroqDjsCaSkfneh",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeHDEQaroqDjs4k6Xlz1v",
+ "payment_method": "pm_1ODZZeDEQaroqDjsJoaoeBMM",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.create.1.json
index 79ed1ff61e3..01e32f0d20d 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02GoWADbjo3Y8YZmgafNCDXrN3FaOx486LR6rqwnsnNvY0xq",
+ "id": "cs_test_NORMALIZED01FdnT3elQsfRxiebEw7b4GmDTkGHFmyv3rEbzQFhcdalnCS",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbeGDEQaroqDjsPngZJnSi",
+ "setup_intent": "seti_1ODZZdDEQaroqDjs4qXCACvq",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02GoWADbjo3Y8YZmgafNCDXrN3FaOx486LR6rqwnsnNvY0xq#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01FdnT3elQsfRxiebEw7b4GmDTkGHFmyv3rEbzQFhcdalnCS#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.list.1.json
index 3eb1694abe1..9ba3700e4de 100644
--- a/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/payment_intent_succeeded_event_with_uncaught_exception--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02GoWADbjo3Y8YZmgafNCDXrN3FaOx486LR6rqwnsnNvY0xq",
+ "id": "cs_test_NORMALIZED01FdnT3elQsfRxiebEw7b4GmDTkGHFmyv3rEbzQFhcdalnCS",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbeGDEQaroqDjsPngZJnSi",
+ "setup_intent": "seti_1ODZZdDEQaroqDjs4qXCACvq",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02GoWADbjo3Y8YZmgafNCDXrN3FaOx486LR6rqwnsnNvY0xq#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01FdnT3elQsfRxiebEw7b4GmDTkGHFmyv3rEbzQFhcdalnCS#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.1.json
index 1eafeba16f9..942600e388b 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "default_payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.2.json
index 10e802915a3..e731fd4ddb6 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.2.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "default_payment_method": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.3.json
index bf577784aaf..e9c25d8fa4c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.modify.3.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbf2DEQaroqDjs6O4LRU3U",
+ "default_payment_method": "pm_1ODZa6DEQaroqDjsBeAKxfS1",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.1.json
index 94a3c74c37b..3e09a6b49ba 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.1.json
@@ -2,10 +2,10 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "delinquent": true,
+ "delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
@@ -40,7 +40,7 @@
"fingerprint": "NORMALIZED000001",
"funding": "credit",
"generated_from": null,
- "last4": "0341",
+ "last4": "4242",
"networks": {
"available": [
"visa"
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZZnDEQaroqDjsRI67eH96",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 3,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.2.json
index 0bbf5bf0b08..3e09a6b49ba 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.2.json
@@ -2,10 +2,10 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "delinquent": true,
+ "delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
@@ -13,7 +13,53 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZnDEQaroqDjsRI67eH96",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
"footer": null,
"rendering_options": null
},
@@ -23,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 3,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.3.json
index 11f7e871b75..3e09a6b49ba 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.3.json
@@ -2,8 +2,8 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -28,7 +28,7 @@
"phone": null
},
"card": {
- "brand": "mastercard",
+ "brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
@@ -37,13 +37,13 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000002",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"generated_from": null,
- "last4": "4444",
+ "last4": "4242",
"networks": {
"available": [
- "mastercard"
+ "visa"
],
"preferred": null
},
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbf2DEQaroqDjs6O4LRU3U",
+ "id": "pm_1ODZZnDEQaroqDjsRI67eH96",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 3,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.4.json
new file mode 100644
index 00000000000..3e09a6b49ba
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZZnDEQaroqDjsRI67eH96",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.5.json
similarity index 85%
rename from corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json
rename to corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.5.json
index d46ee1e0fb3..e2b49e5126c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.5.json
@@ -3,6 +3,7 @@
"balance": 0,
"created": 1000000000,
"currency": "usd",
+ "default_currency": "usd",
"default_source": null,
"delinquent": true,
"description": "zulip (Zulip Dev)",
@@ -34,9 +35,9 @@
"cvc_check": "pass"
},
"country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -53,13 +54,14 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "footer": null
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
"metadata": {
@@ -72,5 +74,6 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "tax_exempt": "none"
+ "tax_exempt": "none",
+ "test_clock": null
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.6.json
new file mode 100644
index 00000000000..0bbf5bf0b08
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.6.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": true,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": null,
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 3,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.7.json
similarity index 85%
rename from corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json
rename to corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.7.json
index 9581cba696f..d1c4cc18c5c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Customer.retrieve.7.json
@@ -3,6 +3,7 @@
"balance": 0,
"created": 1000000000,
"currency": "usd",
+ "default_currency": "usd",
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -34,9 +35,9 @@
"cvc_check": "pass"
},
"country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000002",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000003",
"funding": "credit",
"generated_from": null,
"last4": "4444",
@@ -53,13 +54,14 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1JItT7A4KHR4JzRvp5lQOWqG",
+ "id": "pm_1ODZa6DEQaroqDjsBeAKxfS1",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "footer": null
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
"metadata": {
@@ -72,5 +74,6 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "tax_exempt": "none"
+ "tax_exempt": "none",
+ "test_clock": null
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.1.json
index 1b4bf69c281..808706f1748 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.1.json
@@ -5,62 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "amount": -48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0002",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
+ "footer": null,
+ "rendering_options": null
},
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbeRDEQaroqDjsawIQum5g",
+ "id": "evt_1ODZZpDEQaroqDjsaksm7sLG",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "70b8fc3e-7b79-4b6c-ab91-46283adb57f7"
+ "idempotency_key": "01b9dac5-1d6b-40ac-b08b-20ec652467e6"
},
- "type": "invoiceitem.created"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.2.json
index ed4dd2c4092..6c265afe8dd 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.2.json
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -98,7 +98,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000003",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKGitKoGMgYSlbk05ZM6LBYolFkMpN8cFJlA0APM0-3PpWRoZqmE6FTiFONVk2BAMQcJoxObfA53sTa8",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNi136oGMgaUD2v4J7M6LBYYJwCifNZeOfdFd7EqBHcFp3qw4IoW7pV1kMvBp_Pua71BiRAc7vnPVyPM",
"refunded": false,
"refunds": {
"data": [],
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_FMamuhfswU7t4Hoq7dbK49WgR",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_SjfUQBf7o3ccnZsYnAaZYyvx2",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbeWDEQaroqDjs13Mps43Z",
+ "id": "evt_3ODZZrDEQaroqDjs0sJHWmwX",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "992ff2f8-dd80-467d-b9e6-a75f3f38ea15"
+ "idempotency_key": "f0308e9e-4a77-4ec2-85ea-2d8c799457f1"
},
"type": "payment_intent.succeeded"
},
@@ -279,7 +279,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -295,7 +295,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000003",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKGitKoGMgYotVh7m0E6LBYabVTx_omNTR6pF1xML-kIZq9ieaH3asgSdCtey87Ma9HmWE8F20jgTy0f",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNi136oGMgan29ZDQ506LBbvTWXJJQKfvne6siVOioPbeGYHi5B9479-xOaAH0G2xkZ0QthWa0Ig6T2U",
"refunded": false,
"refunds": {
"data": [],
@@ -341,412 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbeWDEQaroqDjs1bKPW7tB",
+ "id": "evt_3ODZZrDEQaroqDjs02CCSwaZ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "992ff2f8-dd80-467d-b9e6-a75f3f38ea15"
+ "idempotency_key": "f0308e9e-4a77-4ec2-85ea-2d8c799457f1"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbecDEQaroqDjsWT1aHT0c",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "8d7ecc04-898b-4ec2-9d3a-4f685bc972c0"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbeaDEQaroqDjsf1mAiLMc_secret_OyYmOW2gC4Gjq4lUuEBIYmKjDnehX85",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbeaDEQaroqDjsf1mAiLMc",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbeaDEQaroqDjspHmdha2Q",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbebDEQaroqDjsIs5d4ZZw",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c29c3b09-9927-4d7b-b4e2-f4101826ca7a"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbeaDEQaroqDjsG1qxSdi4",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c29c3b09-9927-4d7b-b4e2-f4101826ca7a"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbeaDEQaroqDjsf1mAiLMc_secret_OyYmOW2gC4Gjq4lUuEBIYmKjDnehX85",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbeaDEQaroqDjsf1mAiLMc",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbeaDEQaroqDjspHmdha2Q",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbebDEQaroqDjsjg2P2ztF",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c29c3b09-9927-4d7b-b4e2-f4101826ca7a"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbeYDEQaroqDjsjwpilxVQ_secret_OyYmiqUvOXmcVNgidNHD3JAbJ7Deicp",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbeYDEQaroqDjsjwpilxVQ",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbeYDEQaroqDjsUCDx9nJE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "1f55a9d0-1fec-4c44-bbe3-2fca8570766e"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_FMamuhfswU7t4Hoq7dbK49WgR",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbeWDEQaroqDjs146C2vAq",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "60f405d9-ce50-44a1-a591-e2b932bcc1aa"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbeWDEQaroqDjsy5BfrgVi",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "ff63915a-17b6-4f14-af59-8f2961e995aa"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.3.json
index 199dc0ef79b..180d971e0a9 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.3.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc30200q63DPYAV?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc00200psXrWwm4?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc30200q63DPYAV/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc00200psXrWwm4/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -62,13 +62,13 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -112,179 +112,6 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbejDEQaroqDjsL8vetRFe",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "b086217a-852b-491b-b0f3-a0e081e0ddc2"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc30200q63DPYAV?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc30200q63DPYAV/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -312,56 +139,6 @@
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
"unit_amount": -48000,
"unit_amount_decimal": "-48000"
},
@@ -433,7 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -457,13 +234,13 @@
}
}
},
- "id": "evt_1OAbejDEQaroqDjsLJSQUx6E",
+ "id": "evt_1ODZZuDEQaroqDjsTYoTbu6K",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "b086217a-852b-491b-b0f3-a0e081e0ddc2"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7f25f52e-840e-4ba2-bcbb-a77b7c938f5f"
},
"type": "invoice.updated"
},
@@ -529,13 +306,13 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -544,13 +321,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -579,7 +356,7 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -594,13 +371,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -680,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbeiDEQaroqDjss03qIOpC",
+ "id": "evt_1ODZZtDEQaroqDjsCcpqigFQ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "2195528a-b77e-4a24-8f62-7fd22a32dd23"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "05fb7cbb-a571-4df7-b190-4672063ca7b6"
},
"type": "invoice.created"
},
@@ -702,14 +479,14 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -718,13 +495,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -742,13 +519,13 @@
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbehDEQaroqDjsgJNKR9KS",
+ "id": "evt_1ODZZtDEQaroqDjsZQOJANoB",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "62dda713-fba8-40c8-9468-8763214621b3"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "a9c93b6f-4e3b-4d48-a294-5db7a4862314"
},
"type": "invoiceitem.created"
},
@@ -764,7 +541,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -780,13 +557,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -804,13 +581,13 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbegDEQaroqDjs5iqQz8gd",
+ "id": "evt_1ODZZsDEQaroqDjsJrkRWseb",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "aaa1821f-18a7-45e7-a63d-02fb0ee5dd3b"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "4185dcc0-01b0-4ac1-a57a-822587d5fca4"
},
"type": "invoiceitem.created"
},
@@ -833,7 +610,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "default_payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"footer": null,
"rendering_options": null
},
@@ -856,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbegDEQaroqDjslELpzI99",
+ "id": "evt_1ODZZsDEQaroqDjsa3nbkynM",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "aaa1821f-18a7-45e7-a63d-02fb0ee5dd3b"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "4185dcc0-01b0-4ac1-a57a-822587d5fca4"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.4.json
index d52f9a6e2d1..c936922ba6c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.4.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc40200yXuItg87?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc00200psXrWwm4?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc40200yXuItg87/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc00200psXrWwm4/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -62,13 +62,13 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -112,179 +112,6 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbekDEQaroqDjsndJ3VBAt",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "b086217a-852b-491b-b0f3-a0e081e0ddc2"
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc40200yXuItg87?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc40200yXuItg87/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -312,56 +139,6 @@
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
"unit_amount": -48000,
"unit_amount_decimal": "-48000"
},
@@ -433,18 +210,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbekDEQaroqDjsx48WUxeW",
+ "id": "evt_1ODZZuDEQaroqDjsOAeWDgcU",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "b086217a-852b-491b-b0f3-a0e081e0ddc2"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7f25f52e-840e-4ba2-bcbb-a77b7c938f5f"
},
- "type": "invoice.paid"
+ "type": "invoice.finalized"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.5.json b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.5.json
index 6d922067afe..88cb6fdb357 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.5.json
@@ -1,5 +1,452 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc10200x8KYxSbH?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc10200x8KYxSbH/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZZvDEQaroqDjsJhNNsOzG",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7f25f52e-840e-4ba2-bcbb-a77b7c938f5f"
+ },
+ "type": "invoice.payment_succeeded"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc10200x8KYxSbH?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc10200x8KYxSbH/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZZvDEQaroqDjssM9izls4",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "7f25f52e-840e-4ba2-bcbb-a77b7c938f5f"
+ },
+ "type": "invoice.paid"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--Event.list.6.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.4.json
rename to corporate/tests/stripe_fixtures/replace_payment_method--Event.list.6.json
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.1.json
index 8dfab020689..ee4c6393e41 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.1.json
@@ -56,13 +56,13 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -106,7 +106,7 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.2.json
index 913158477f1..e427e4982c5 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.create.2.json
@@ -56,7 +56,7 @@
"discountable": true,
"discounts": [],
"id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.1.json
index c91aea981db..0c0787e4dcf 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc30200q63DPYAV?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc00200psXrWwm4?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMjc30200q63DPYAV/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjc00200psXrWwm4/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -56,13 +56,13 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -106,7 +106,7 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.2.json
index 053eb011e61..69718403fdd 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMjgy0200deNtOA9y?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjc30200mcYix1WU?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMjgy0200deNtOA9y/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjc30200mcYix1WU/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -56,7 +56,7 @@
"discountable": true,
"discounts": [],
"id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -154,5 +154,5 @@
"total_excluding_tax": 5000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.2.json
index c10781fa97f..e40b84b037c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMjkw0200sP5zVYqf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjgy0200GC2gzLch?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMjkw0200sP5zVYqf/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjgy0200GC2gzLch/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -58,7 +58,7 @@
"discountable": true,
"discounts": [],
"id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.3.json
index e10d2c2df0d..7fc19f97cd8 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.3.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMzAw0200NUVM0ePp?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjg40200jy8bWDiB?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMzAw0200NUVM0ePp/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjg40200jy8bWDiB/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -58,7 +58,7 @@
"discountable": true,
"discounts": [],
"id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.4.json
index d2fa8728e71..a0fa40b6547 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMzAz0200oFHB24HR?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjkx0200iY4cuQIg?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMzAz0200oFHB24HR/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjkx0200iY4cuQIg/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -58,7 +58,7 @@
"discountable": true,
"discounts": [],
"id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMzAz0200bn86qRvV?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjkx0200CQwzYUzD?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlteHVhWHE0Q3dVU3RUZUZmNmdwZEJvZVA0R3FlLDkwMDkwMzAz0200bn86qRvV/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwMUEzTlFvcUFMcFNORXd4SG4xdUQ1S1FrV25JLDkwNzk3Mjkx0200CQwzYUzD/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -216,13 +216,13 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -231,13 +231,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -266,7 +266,7 @@
"discountable": false,
"discounts": [],
"id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -281,13 +281,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.1.json
index 030bb7203ac..d4ff412889a 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.1.json
@@ -74,7 +74,7 @@
},
"paid": false,
"payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "payment_method": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"payment_method_details": {
"card": {
"amount_authorized": null,
@@ -90,7 +90,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -135,7 +135,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_Xnfeb3bcGcLT0u7Y6t4QrBywl",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_7Eo8FACzzYBdY9W7tuf4iwCHV",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -173,7 +173,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -190,7 +190,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -255,7 +255,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -272,13 +272,13 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0012?t=1699549490",
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0007?t=1700256482",
"setup_intent": null,
"source": null,
"type": "card_error"
@@ -291,13 +291,13 @@
"Access-Control-Max-Age": "300",
"Cache-Control": "no-cache, no-store",
"Connection": "keep-alive",
- "Content-Length": "9060",
+ "Content-Length": "9061",
"Content-Security-Policy": "report-uri https://q.stripe.com/csp-report?p=v1%2Finvoices%2F%3Ainvoice%2Fpay; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'",
"Content-Type": "application/json",
"Date": "NORMALIZED DATETIME",
- "Idempotency-Key": "c79d6ed1-3d57-49cf-b3e5-c5fda9deb46f",
- "Original-Request": "req_NORMALIZED0012",
- "Request-Id": "req_NORMALIZED0012",
+ "Idempotency-Key": "41981401-6b92-482e-be79-dd1618dced34",
+ "Original-Request": "req_NORMALIZED0007",
+ "Request-Id": "req_NORMALIZED0007",
"Server": "nginx",
"Strict-Transport-Security": "max-age=63072000; includeSubDomains; preload",
"Stripe-Should-Retry": "false",
@@ -380,7 +380,7 @@
},
"paid": false,
"payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "payment_method": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"payment_method_details": {
"card": {
"amount_authorized": null,
@@ -396,7 +396,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -447,7 +447,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_Xnfeb3bcGcLT0u7Y6t4QrBywl",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_7Eo8FACzzYBdY9W7tuf4iwCHV",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -485,7 +485,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -502,7 +502,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -567,7 +567,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -584,16 +584,16 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0012?t=1699549490",
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0007?t=1700256482",
"type": "card_error"
}
},
"param": null,
- "request_id": "req_NORMALIZED0012"
+ "request_id": "req_NORMALIZED0007"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.2.json
index 36fbc4054e5..ac1cd9f17cd 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--Invoice.pay.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMzAy02003lIwQlhT?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjkw0200zGeo9ek5?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVltR1FNeHhDOVNvQnZ6S3pHbVJTdkpiZk9zdkNRLDkwMDkwMzAy02003lIwQlhT/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNwQVEyWFJ3QjAxRXR4TkQ5ZmszYjV1ZDFTQ0dVLDkwNzk3Mjkw0200zGeo9ek5/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -56,7 +56,7 @@
"discountable": true,
"discounts": [],
"id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.1.json
index 764cae04ae0..fcb1c3c2e9d 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.2.json
index 0fae7503f0b..11622f30a73 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.2.json
@@ -6,14 +6,14 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.3.json
index 97476d81799..e749716c470 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--InvoiceItem.create.3.json
@@ -6,7 +6,7 @@
"description": null,
"discountable": true,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.create.1.json
index d7def8693e0..1e96603772d 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,13 +12,138 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNe136oGMgb7GyRiSqc6LBYAqD2uSc3LdfubVlov-2C3J7o4WjKliVlhcL_n16gVQgL9elrSI_pQJJm9",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
+ "total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_FMamuhfswU7t4Hoq7dbK49WgR",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_SjfUQBf7o3ccnZsYnAaZYyvx2",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -27,7 +152,7 @@
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.1.json
index 30bf7855e19..a756875ad8a 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.1.json
@@ -22,7 +22,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -39,7 +39,7 @@
},
"created": 1000000000,
"customer": null,
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.2.json
index aeff43406a4..bf5c61f966d 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.detach.2.json
@@ -22,7 +22,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000003",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"generated_from": null,
"last4": "4242",
@@ -39,7 +39,7 @@
},
"created": 1000000000,
"customer": null,
- "id": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "id": "pm_1ODZZnDEQaroqDjsRI67eH96",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.1.json
index 02bec76844b..8f1b768f3c3 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.1.json
@@ -24,7 +24,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "NORMALIZED000002",
"funding": "credit",
"generated_from": null,
"last4": "0341",
@@ -41,7 +41,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "id": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -71,7 +71,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000003",
+ "fingerprint": "NORMALIZED000001",
"funding": "credit",
"generated_from": null,
"last4": "4242",
@@ -88,7 +88,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "id": "pm_1ODZZnDEQaroqDjsRI67eH96",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.2.json
index 425782d88a8..5ab5b32db32 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--PaymentMethod.list.2.json
@@ -24,7 +24,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000002",
+ "fingerprint": "NORMALIZED000003",
"funding": "credit",
"generated_from": null,
"last4": "4444",
@@ -41,7 +41,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbf2DEQaroqDjs6O4LRU3U",
+ "id": "pm_1ODZa6DEQaroqDjsBeAKxfS1",
"livemode": false,
"metadata": {},
"object": "payment_method",
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.1.json
index f64f3bf5620..911783a66cf 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeaDEQaroqDjsf1mAiLMc_secret_OyYmOW2gC4Gjq4lUuEBIYmKjDnehX85",
+ "client_secret": "seti_1ODZZnDEQaroqDjs5W6uMeGE_secret_P1cpAMZFK9bAlUcgKmTMzJz3ROuR19s",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeaDEQaroqDjsf1mAiLMc",
+ "id": "seti_1ODZZnDEQaroqDjs5W6uMeGE",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbeaDEQaroqDjspHmdha2Q",
+ "latest_attempt": "setatt_1ODZZnDEQaroqDjs9YBvHeqk",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.2.json
index 4e9c94db2d4..261dac48e00 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.2.json
@@ -50,23 +50,23 @@
},
"created": 1000000000,
"customer": null,
- "id": "pm_1OAbeqDEQaroqDjsPZb92EXj",
+ "id": "pm_1ODZZyDEQaroqDjsEAY2TDVm",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0013?t=1699549484",
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0008?t=1700256478",
"setup_intent": {
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeqDEQaroqDjsVJlI2iBh_secret_OyYm8osH4UqZxcrQdHY8ld3mDH7LtAT",
+ "client_secret": "seti_1ODZZyDEQaroqDjsiGLkA5AP_secret_P1cpPkmxs6Z2EGscRuFdYGrtTYTpLyM",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeqDEQaroqDjsVJlI2iBh",
+ "id": "seti_1ODZZyDEQaroqDjsiGLkA5AP",
"last_setup_error": {
"code": "card_declined",
"decline_code": "generic_decline",
@@ -113,7 +113,7 @@
},
"created": 1000000000,
"customer": null,
- "id": "pm_1OAbeqDEQaroqDjsPZb92EXj",
+ "id": "pm_1ODZZyDEQaroqDjsEAY2TDVm",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -121,7 +121,7 @@
},
"type": "card_error"
},
- "latest_attempt": "setatt_1OAbeqDEQaroqDjsGUdJFEXx",
+ "latest_attempt": "setatt_1ODZZyDEQaroqDjstCrGAGTk",
"livemode": false,
"mandate": null,
"metadata": {},
@@ -159,9 +159,9 @@
"Content-Security-Policy": "report-uri https://q.stripe.com/csp-report?p=v1%2Fsetup_intents; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'",
"Content-Type": "application/json",
"Date": "NORMALIZED DATETIME",
- "Idempotency-Key": "b16a8dde-5e77-470d-91b5-134561ec23cb",
- "Original-Request": "req_NORMALIZED0013",
- "Request-Id": "req_NORMALIZED0013",
+ "Idempotency-Key": "72218059-72e9-4cc4-82e1-11e5c6e43dca",
+ "Original-Request": "req_NORMALIZED0008",
+ "Request-Id": "req_NORMALIZED0008",
"Server": "nginx",
"Strict-Transport-Security": "max-age=63072000; includeSubDomains; preload",
"Stripe-Should-Retry": "false",
@@ -218,23 +218,23 @@
},
"created": 1000000000,
"customer": null,
- "id": "pm_1OAbeqDEQaroqDjsPZb92EXj",
+ "id": "pm_1ODZZyDEQaroqDjsEAY2TDVm",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
},
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0013?t=1699549484",
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0008?t=1700256478",
"setup_intent": {
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeqDEQaroqDjsVJlI2iBh_secret_OyYm8osH4UqZxcrQdHY8ld3mDH7LtAT",
+ "client_secret": "seti_1ODZZyDEQaroqDjsiGLkA5AP_secret_P1cpPkmxs6Z2EGscRuFdYGrtTYTpLyM",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeqDEQaroqDjsVJlI2iBh",
+ "id": "seti_1ODZZyDEQaroqDjsiGLkA5AP",
"last_setup_error": {
"code": "card_declined",
"decline_code": "generic_decline",
@@ -281,7 +281,7 @@
},
"created": 1000000000,
"customer": null,
- "id": "pm_1OAbeqDEQaroqDjsPZb92EXj",
+ "id": "pm_1ODZZyDEQaroqDjsEAY2TDVm",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -289,7 +289,7 @@
},
"type": "card_error"
},
- "latest_attempt": "setatt_1OAbeqDEQaroqDjsGUdJFEXx",
+ "latest_attempt": "setatt_1ODZZyDEQaroqDjstCrGAGTk",
"livemode": false,
"mandate": null,
"metadata": {},
@@ -316,5 +316,5 @@
}
},
"param": null,
- "request_id": "req_NORMALIZED0013"
+ "request_id": "req_NORMALIZED0008"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.3.json
index 25e87a2171d..a4f8396d554 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.3.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbesDEQaroqDjsgHFzzsAs_secret_OyYm8JOFhMG0Vhw4g6b9h6JxT3LpNWM",
+ "client_secret": "seti_1ODZa0DEQaroqDjs3jfpUg6P_secret_P1cpO2bNXBOUZTvAxhkzEq3Uc7MLHlC",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbesDEQaroqDjsgHFzzsAs",
+ "id": "seti_1ODZa0DEQaroqDjs3jfpUg6P",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbesDEQaroqDjseXVzfX5C",
+ "latest_attempt": "setatt_1ODZa0DEQaroqDjsorASEwms",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "payment_method": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.4.json
index a9f46af414d..bd806e4cda0 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.create.4.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbf3DEQaroqDjsS0jJArHI_secret_OyYmdoMjmYWWaljrIL309A0kSKwE01b",
+ "client_secret": "seti_1ODZa6DEQaroqDjsUZNqaKnz_secret_P1cpL1DxO12kEtaJgCLeHJM9Zk8v2RN",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbf3DEQaroqDjsS0jJArHI",
+ "id": "seti_1ODZa6DEQaroqDjsUZNqaKnz",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbf3DEQaroqDjseD1zwOAd",
+ "latest_attempt": "setatt_1ODZa6DEQaroqDjs7AAjg5Ut",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbf2DEQaroqDjs6O4LRU3U",
+ "payment_method": "pm_1ODZa6DEQaroqDjsBeAKxfS1",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.1.json
index c2a17f7fcde..f55508c510a 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeYDEQaroqDjsjwpilxVQ_secret_OyYmiqUvOXmcVNgidNHD3JAbJ7Deicp",
+ "client_secret": "seti_1ODZZmDEQaroqDjs251YiE35_secret_P1cpjP8ooWn1d2NW8SHpbtbALpiw2s7",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeYDEQaroqDjsjwpilxVQ",
+ "id": "seti_1ODZZmDEQaroqDjs251YiE35",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.2.json
index 38289f17dea..72bea3aea18 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.2.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbepDEQaroqDjsdWJVLfSn_secret_OyYmMY9mOFrk12nW1fbocuh27KlN4WI",
+ "client_secret": "seti_1ODZZxDEQaroqDjs2OnxLNbu_secret_P1cp3J9sqJzduEFXLulyNrXfy5GorwZ",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbepDEQaroqDjsdWJVLfSn",
+ "id": "seti_1ODZZxDEQaroqDjs2OnxLNbu",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.3.json
index f9662855949..766ca6d0a8a 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.3.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAberDEQaroqDjsn5TqeWq0_secret_OyYm0JfUkxhz1Jtwep0lyIYypDzwG8b",
+ "client_secret": "seti_1ODZZzDEQaroqDjsWcl156y9_secret_P1cpRZ9z4JyKhZ8hRJoWvWDRe7ioMyo",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAberDEQaroqDjsn5TqeWq0",
+ "id": "seti_1ODZZzDEQaroqDjsWcl156y9",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.4.json
index d8de2d655a9..19b14010e43 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.list.4.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbf0DEQaroqDjsVcgavnHC_secret_OyYmuVjylB8bP3cLErVFxrcAI2yl4mN",
+ "client_secret": "seti_1ODZa5DEQaroqDjsnToh0SIX_secret_P1cpiGDGvS0rXdXgSLAW6RYOqAhlFxb",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbf0DEQaroqDjsVcgavnHC",
+ "id": "seti_1ODZa5DEQaroqDjsnToh0SIX",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.1.json
index f64f3bf5620..911783a66cf 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbeaDEQaroqDjsf1mAiLMc_secret_OyYmOW2gC4Gjq4lUuEBIYmKjDnehX85",
+ "client_secret": "seti_1ODZZnDEQaroqDjs5W6uMeGE_secret_P1cpAMZFK9bAlUcgKmTMzJz3ROuR19s",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbeaDEQaroqDjsf1mAiLMc",
+ "id": "seti_1ODZZnDEQaroqDjs5W6uMeGE",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbeaDEQaroqDjspHmdha2Q",
+ "latest_attempt": "setatt_1ODZZnDEQaroqDjs9YBvHeqk",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbeaDEQaroqDjskHnvh2Ui",
+ "payment_method": "pm_1ODZZnDEQaroqDjsRI67eH96",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.2.json
index 25e87a2171d..a4f8396d554 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.2.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbesDEQaroqDjsgHFzzsAs_secret_OyYm8JOFhMG0Vhw4g6b9h6JxT3LpNWM",
+ "client_secret": "seti_1ODZa0DEQaroqDjs3jfpUg6P_secret_P1cpO2bNXBOUZTvAxhkzEq3Uc7MLHlC",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbesDEQaroqDjsgHFzzsAs",
+ "id": "seti_1ODZa0DEQaroqDjs3jfpUg6P",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbesDEQaroqDjseXVzfX5C",
+ "latest_attempt": "setatt_1ODZa0DEQaroqDjsorASEwms",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbesDEQaroqDjs5R6CuXDC",
+ "payment_method": "pm_1ODZa0DEQaroqDjsfkPI8Yxd",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.3.json
index a9f46af414d..bd806e4cda0 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--SetupIntent.retrieve.3.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbf3DEQaroqDjsS0jJArHI_secret_OyYmdoMjmYWWaljrIL309A0kSKwE01b",
+ "client_secret": "seti_1ODZa6DEQaroqDjsUZNqaKnz_secret_P1cpL1DxO12kEtaJgCLeHJM9Zk8v2RN",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbf3DEQaroqDjsS0jJArHI",
+ "id": "seti_1ODZa6DEQaroqDjsUZNqaKnz",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbf3DEQaroqDjseD1zwOAd",
+ "latest_attempt": "setatt_1ODZa6DEQaroqDjs7AAjg5Ut",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbf2DEQaroqDjs6O4LRU3U",
+ "payment_method": "pm_1ODZa6DEQaroqDjsBeAKxfS1",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.1.json
index 5290f37a4dd..19ed85225e0 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02GImFBLwxDnKRgALG790SizfknNrMTd6DCBdWqLJhzYAF8e",
+ "id": "cs_test_NORMALIZED02kCwvFSLXC1Wt6rz3EVIHFyRDikux9Ldi9iSgK36d1CnYlW",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbeYDEQaroqDjsjwpilxVQ",
+ "setup_intent": "seti_1ODZZmDEQaroqDjs251YiE35",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02GImFBLwxDnKRgALG790SizfknNrMTd6DCBdWqLJhzYAF8e#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02kCwvFSLXC1Wt6rz3EVIHFyRDikux9Ldi9iSgK36d1CnYlW#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.2.json
index 4006ee3ce28..c017b93e239 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.2.json
@@ -34,7 +34,7 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03aOnDPzdDK18jVMGe5YE2JYjc0tasQt57JUuXIWk6k1rbNI",
+ "id": "cs_test_NORMALIZED030YLT5w0LvzSqaLdLrnSVfaYhuX0emr8loH1lYLatGauuAn",
"invoice": null,
"invoice_creation": null,
"livemode": false,
@@ -58,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbepDEQaroqDjsdWJVLfSn",
+ "setup_intent": "seti_1ODZZxDEQaroqDjs2OnxLNbu",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -69,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03aOnDPzdDK18jVMGe5YE2JYjc0tasQt57JUuXIWk6k1rbNI#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED030YLT5w0LvzSqaLdLrnSVfaYhuX0emr8loH1lYLatGauuAn#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.3.json
index ff9e8c2b0db..d1e1df9f6b4 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.3.json
@@ -34,7 +34,7 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED04qRpytga9kdfhnzIxwmQ1BF59B8hoI0V575VfbD3QAxHlyO",
+ "id": "cs_test_NORMALIZED040xJXScuYdetllL1Crweg3af79TG9ZAPzEqhV97Pmj4NnTi",
"invoice": null,
"invoice_creation": null,
"livemode": false,
@@ -58,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAberDEQaroqDjsn5TqeWq0",
+ "setup_intent": "seti_1ODZZzDEQaroqDjsWcl156y9",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -69,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED04qRpytga9kdfhnzIxwmQ1BF59B8hoI0V575VfbD3QAxHlyO#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED040xJXScuYdetllL1Crweg3af79TG9ZAPzEqhV97Pmj4NnTi#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.4.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.4.json
index 751ad38cf5e..7777064ad3d 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.create.4.json
@@ -34,7 +34,7 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED05bNL5sYVVEAnJVd8jOtzB46s5oQwNOb3y9y6nHz9MDL5k6Z",
+ "id": "cs_test_NORMALIZED05wzwBduNX3uS7SIimgArgoeONFHL2ahVt5YYznlwrUw5XYu",
"invoice": null,
"invoice_creation": null,
"livemode": false,
@@ -58,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbf0DEQaroqDjsVcgavnHC",
+ "setup_intent": "seti_1ODZa5DEQaroqDjsnToh0SIX",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -69,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED05bNL5sYVVEAnJVd8jOtzB46s5oQwNOb3y9y6nHz9MDL5k6Z#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED05wzwBduNX3uS7SIimgArgoeONFHL2ahVt5YYznlwrUw5XYu#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.1.json
index 73618f3897e..7f99edec0fc 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02GImFBLwxDnKRgALG790SizfknNrMTd6DCBdWqLJhzYAF8e",
+ "id": "cs_test_NORMALIZED02kCwvFSLXC1Wt6rz3EVIHFyRDikux9Ldi9iSgK36d1CnYlW",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbeYDEQaroqDjsjwpilxVQ",
+ "setup_intent": "seti_1ODZZmDEQaroqDjs251YiE35",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02GImFBLwxDnKRgALG790SizfknNrMTd6DCBdWqLJhzYAF8e#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02kCwvFSLXC1Wt6rz3EVIHFyRDikux9Ldi9iSgK36d1CnYlW#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.2.json
index 784d264bc29..8308d0fa400 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.2.json
@@ -36,7 +36,7 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED04qRpytga9kdfhnzIxwmQ1BF59B8hoI0V575VfbD3QAxHlyO",
+ "id": "cs_test_NORMALIZED040xJXScuYdetllL1Crweg3af79TG9ZAPzEqhV97Pmj4NnTi",
"invoice": null,
"invoice_creation": null,
"livemode": false,
@@ -60,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAberDEQaroqDjsn5TqeWq0",
+ "setup_intent": "seti_1ODZZzDEQaroqDjsWcl156y9",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -71,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED04qRpytga9kdfhnzIxwmQ1BF59B8hoI0V575VfbD3QAxHlyO#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED040xJXScuYdetllL1Crweg3af79TG9ZAPzEqhV97Pmj4NnTi#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.3.json
index ee45a9a83fc..e48954a6a01 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_method--checkout.Session.list.3.json
@@ -36,7 +36,7 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED05bNL5sYVVEAnJVd8jOtzB46s5oQwNOb3y9y6nHz9MDL5k6Z",
+ "id": "cs_test_NORMALIZED05wzwBduNX3uS7SIimgArgoeONFHL2ahVt5YYznlwrUw5XYu",
"invoice": null,
"invoice_creation": null,
"livemode": false,
@@ -60,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbf0DEQaroqDjsVcgavnHC",
+ "setup_intent": "seti_1ODZa5DEQaroqDjsnToh0SIX",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -71,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED05bNL5sYVVEAnJVd8jOtzB46s5oQwNOb3y9y6nHz9MDL5k6Z#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED05wzwBduNX3uS7SIimgArgoeONFHL2ahVt5YYznlwrUw5XYu#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.create.1.json
deleted file mode 100644
index 730ed973b02..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.create.1.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.1.json
deleted file mode 100644
index 730ed973b02..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.1.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.2.json
deleted file mode 100644
index f1643806007..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.2.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.3.json
deleted file mode 100644
index 033fd58262f..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.3.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 3,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.4.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.4.json
deleted file mode 100644
index a895b3415da..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.modify.4.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_source": null,
- "delinquent": true,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1JItT7A4KHR4JzRvp5lQOWqG",
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 3,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.1.json
deleted file mode 100644
index 730ed973b02..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.1.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.2.json
deleted file mode 100644
index 230a571b80e..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.2.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 3,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.4.json
deleted file mode 100644
index c48aea382f9..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.4.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_source": null,
- "delinquent": true,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 3,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.1.json
deleted file mode 100644
index 79aae8302ff..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.1.json
+++ /dev/null
@@ -1,152 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 984000,
- "amount_paid": 0,
- "amount_remaining": 984000,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000019XmJp",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000019XmJp/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 984000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1393729445,
- "start": 1362193445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 123,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 984000,
- "tax": null,
- "total": 984000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
- }
- },
- "id": "evt_1JItSfA4KHR4JzRvByroiBGa",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0001",
- "idempotency_key": "6436e396-71ab-4ba8-8dcf-f1ccea116a67"
- },
- "type": "invoice.finalized"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.2.json
deleted file mode 100644
index e777f63447a..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Event.list.2.json
+++ /dev/null
@@ -1,702 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_details": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "installments": null,
- "last4": "4242",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_Im1orO6NHwBivJ42MzxCIdEZr",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_1JItSqA4KHR4JzRvrOrG0FkN",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "96d3182e-dae3-43bf-a73f-589301479ade"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_details": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "installments": null,
- "last4": "4242",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_1JItSqA4KHR4JzRvAGpG0LlD",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "96d3182e-dae3-43bf-a73f-589301479ade"
- },
- "type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1JItSoA4KHR4JzRvofWzFFQq",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "0aed21bf-e454-4c99-b545-49f621baaedc"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSlA4KHR4JzRvR6Rwwr7M_secret_Jwn2lXV2MSEZKWF3wSVdeO7lc0vuJG5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSlA4KHR4JzRvR6Rwwr7M",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItSlA4KHR4JzRv7fAlEWY9",
- "livemode": false,
- "mandate": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1JItSmA4KHR4JzRvRNGH8370",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "79b5de70-d672-4624-9597-a8883d1a53e6"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1JItSmA4KHR4JzRvafkfSlRY",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 1,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "79b5de70-d672-4624-9597-a8883d1a53e6"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSlA4KHR4JzRvR6Rwwr7M_secret_Jwn2lXV2MSEZKWF3wSVdeO7lc0vuJG5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSlA4KHR4JzRvR6Rwwr7M",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItSlA4KHR4JzRv7fAlEWY9",
- "livemode": false,
- "mandate": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1JItSmA4KHR4JzRvNMFaTrZx",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "79b5de70-d672-4624-9597-a8883d1a53e6"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSjA4KHR4JzRv9tSAgsFv_secret_Jwn2gEUp7bL0HJuowuuzPaCB43cDc1U",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSjA4KHR4JzRv9tSAgsFv",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1JItSjA4KHR4JzRvWwWty2vw",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "9e0ba2c8-8074-4a2a-bdf2-f183da62ffd9"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_Im1orO6NHwBivJ42MzxCIdEZr",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "payment_intent",
- "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": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_1JItSiA4KHR4JzRvjNtcxlUt",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "7e909a0a-8cd3-4c9d-afd4-12d8250f2454"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none"
- }
- },
- "id": "evt_1JItShA4KHR4JzRvskPDM08r",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "0f864b6f-ac59-42f5-b91e-cf66d3ddf4fb"
- },
- "type": "customer.created"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.1.json
deleted file mode 100644
index faec4ebc0fb..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.1.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- },
- {
- "amount": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": null,
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "payment_intent": null,
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 0,
- "tax": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.2.json
deleted file mode 100644
index e249c2e577b..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.2.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 5000,
- "amount_paid": 0,
- "amount_remaining": 5000,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 5000,
- "currency": "usd",
- "description": null,
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": null,
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "payment_intent": null,
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "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": null,
- "subtotal": 5000,
- "tax": null,
- "total": 5000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.finalize_invoice.1.json
deleted file mode 100644
index d76617ddcdb..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.finalize_invoice.1.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- },
- {
- "amount": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "payment_intent": null,
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 0,
- "tax": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.finalize_invoice.2.json
deleted file mode 100644
index 9a7636ad45f..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.finalize_invoice.2.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 5000,
- "amount_paid": 0,
- "amount_remaining": 5000,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 5000,
- "currency": "usd",
- "description": null,
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": null,
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 5000,
- "tax": null,
- "total": 5000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.2.json
deleted file mode 100644
index 7e94d0d59b5..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.2.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 5000,
- "amount_paid": 0,
- "amount_remaining": 5000,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 5000,
- "currency": "usd",
- "description": null,
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": null,
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 5000,
- "tax": null,
- "total": 5000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.3.json
deleted file mode 100644
index e7de99d9609..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.3.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 5000,
- "amount_paid": 0,
- "amount_remaining": 5000,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000002",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 5000,
- "currency": "usd",
- "description": null,
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": null,
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 5000,
- "tax": null,
- "total": 5000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.4.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.4.json
deleted file mode 100644
index a8a6a013379..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.4.json
+++ /dev/null
@@ -1,311 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 5000,
- "amount_paid": 5000,
- "amount_remaining": 0,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000003",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 5000,
- "currency": "usd",
- "description": null,
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": null,
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 5000,
- "tax": null,
- "total": 5000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- {
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nN4LH/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- },
- {
- "amount": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "payment_intent": null,
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 0,
- "tax": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.1.json
deleted file mode 100644
index 18d931b5488..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.1.json
+++ /dev/null
@@ -1,537 +0,0 @@
-{
- "_message": "Your card was declined.",
- "code": "card_declined",
- "error": {
- "charge": "ch_NORMALIZED00000000000002",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "param": null,
- "payment_intent": {
- "amount": 5000,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 5000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "Stripe",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_method": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "payment_method_details": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "installments": null,
- "last4": "0341",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": null,
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {},
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000003"
- },
- "client_secret": "pi_NORMALIZED00000000000003_secret_kRNeiOWgFBpDweYKcmccTn53m",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000003",
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000002",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "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": null,
- "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
- },
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "setup_intent": null,
- "source": null,
- "type": "card_error"
- },
- "headers": {
- "Connection": "keep-alive",
- "Content-Length": "7950",
- "Content-Type": "application/json",
- "Date": "NORMALIZED DATETIME",
- "Server": "nginx",
- "Strict-Transport-Security": "max-age=31556926; includeSubDomains; preload",
- "access-control-allow-credentials": "true",
- "access-control-allow-methods": "GET, POST, HEAD, OPTIONS, DELETE",
- "access-control-allow-origin": "*",
- "access-control-expose-headers": "Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required",
- "access-control-max-age": "300",
- "cache-control": "no-cache, no-store",
- "idempotency-key": "00000000-0000-0000-0000-000000000000",
- "original-request": "req_NORMALIZED0012",
- "request-id": "req_NORMALIZED0012",
- "stripe-should-retry": "false",
- "stripe-version": "2020-08-27",
- "x-stripe-c-cost": "6"
- },
- "http_body": "{\n \"error\": {\n \"charge\": \"ch_NORMALIZED00000000000002\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_intent\": {\n \"id\": \"pi_NORMALIZED00000000000003\",\n \"object\": \"payment_intent\",\n \"amount\": 5000,\n \"amount_capturable\": 0,\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_NORMALIZED00000000000002\",\n \"object\": \"charge\",\n \"amount\": 5000,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": null,\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"Stripe\",\n \"captured\": false,\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Payment for Invoice\",\n \"destination\": null,\n \"dispute\": null,\n \"disputed\": false,\n \"failure_code\": \"card_declined\",\n \"failure_message\": \"Your card was declined.\",\n \"fraud_details\": {\n },\n \"invoice\": \"in_NORMALIZED00000000000003\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\": null,\n \"order\": null,\n \"outcome\": {\n \"network_status\": \"declined_by_network\",\n \"reason\": \"generic_decline\",\n \"risk_level\": \"normal\",\n \"risk_score\": 14,\n \"seller_message\": \"The bank did not return any further details with this decline.\",\n \"type\": \"issuer_declined\"\n },\n \"paid\": false,\n \"payment_intent\": \"pi_NORMALIZED00000000000003\",\n \"payment_method\": \"pm_1JItSyA4KHR4JzRv1Y1r16Ay\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"0341\",\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_NORMALIZED00000000000002/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"failed\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n \"url\": \"/v1/charges?payment_intent=pi_NORMALIZED00000000000003\"\n },\n \"client_secret\": \"pi_NORMALIZED00000000000003_secret_kRNeiOWgFBpDweYKcmccTn53m\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Payment for Invoice\",\n \"invoice\": \"in_NORMALIZED00000000000003\",\n \"last_payment_error\": {\n \"charge\": \"ch_NORMALIZED00000000000002\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_method\": {\n \"id\": \"pm_1JItSyA4KHR4JzRv1Y1r16Ay\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"type\": \"card_error\"\n },\n \"livemode\": false,\n \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"installments\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n \"payment_method\": {\n \"id\": \"pm_1JItSyA4KHR4JzRv1Y1r16Ay\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"type\": \"card_error\"\n }\n}\n",
- "http_status": 402,
- "json_body": {
- "error": {
- "charge": "ch_NORMALIZED00000000000002",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_intent": {
- "amount": 5000,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 5000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "Stripe",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Payment for Invoice",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_method": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "payment_method_details": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "installments": null,
- "last4": "0341",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": null,
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000003"
- },
- "client_secret": "pi_NORMALIZED00000000000003_secret_kRNeiOWgFBpDweYKcmccTn53m",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Payment for Invoice",
- "id": "pi_NORMALIZED00000000000003",
- "invoice": "in_NORMALIZED00000000000003",
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000002",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "livemode": false,
- "metadata": {},
- "next_action": null,
- "object": "payment_intent",
- "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": null,
- "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
- },
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- }
- },
- "param": null,
- "request_id": "req_NORMALIZED0012"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.2.json
deleted file mode 100644
index a835e27391c..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.2.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "account_country": "US",
- "account_name": "NORMALIZED-1",
- "account_tax_ids": null,
- "amount_due": 5000,
- "amount_paid": 5000,
- "amount_remaining": 0,
- "application_fee_amount": null,
- "attempt_count": 1,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": "ch_NORMALIZED00000000000003",
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000358v2I/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 5000,
- "currency": "usd",
- "description": null,
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0004",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000003",
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": null,
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 5000,
- "tax": null,
- "total": 5000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.1.json
deleted file mode 100644
index 3aa8989852b..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.1.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "amount": -48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.2.json
deleted file mode 100644
index a1d2ecc349b..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.2.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "amount": 48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.3.json
deleted file mode 100644
index 59db9ebd505..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.3.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "amount": 5000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": null,
- "discountable": true,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000004",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_NORMALIZED00000000000004",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0004",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 5000,
- "unit_amount_decimal": "5000"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentIntent.confirm.1.json
deleted file mode 100644
index dbc2ee411f3..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,166 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_details": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "installments": null,
- "last4": "4242",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_Im1orO6NHwBivJ42MzxCIdEZr",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentIntent.create.1.json
deleted file mode 100644
index 00762d0b288..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentIntent.create.1.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_Im1orO6NHwBivJ42MzxCIdEZr",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "payment_intent",
- "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": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.1.json
deleted file mode 100644
index c43d87c7d3e..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.1.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unchecked"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": null,
- "id": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.2.json
deleted file mode 100644
index 3363cb293d2..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.2.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unchecked"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": null,
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.3.json
deleted file mode 100644
index c3973e8004d..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.create.3.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "mastercard",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unchecked"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "generated_from": null,
- "last4": "4444",
- "networks": {
- "available": [
- "mastercard"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": null,
- "id": "pm_1JItT7A4KHR4JzRvp5lQOWqG",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.list.1.json
deleted file mode 100644
index 4fa56da0a0f..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.list.1.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "data": [
- {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/payment_methods"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.list.2.json
deleted file mode 100644
index f0dca83ed27..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--PaymentMethod.list.2.json
+++ /dev/null
@@ -1,148 +0,0 @@
-{
- "data": [
- {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "mastercard",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "generated_from": null,
- "last4": "4444",
- "networks": {
- "available": [
- "mastercard"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItT7A4KHR4JzRvp5lQOWqG",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/payment_methods"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.1.json
deleted file mode 100644
index 337728aafe0..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.1.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSlA4KHR4JzRvR6Rwwr7M_secret_Jwn2lXV2MSEZKWF3wSVdeO7lc0vuJG5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSlA4KHR4JzRvR6Rwwr7M",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItSlA4KHR4JzRv7fAlEWY9",
- "livemode": false,
- "mandate": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.2.json
deleted file mode 100644
index ee5bd192c2f..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.2.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSzA4KHR4JzRvhV3hBuoI_secret_Jwn3R0Urx34VCSRVhtzeSybhx5QLfbv",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSzA4KHR4JzRvhV3hBuoI",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItSzA4KHR4JzRvyl097UvX",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.3.json
deleted file mode 100644
index f17b930b6b3..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.create.3.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItT8A4KHR4JzRvbFwlwx9D_secret_Jwn3yh4lQUxNyuCFJbvla6fhpbuJznt",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItT8A4KHR4JzRvbFwlwx9D",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItT8A4KHR4JzRv01Rk9HCf",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItT7A4KHR4JzRvp5lQOWqG",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.1.json
deleted file mode 100644
index 5241aeccc5d..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.1.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "data": [
- {
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSjA4KHR4JzRv9tSAgsFv_secret_Jwn2gEUp7bL0HJuowuuzPaCB43cDc1U",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSjA4KHR4JzRv9tSAgsFv",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/setup_intents"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.2.json
deleted file mode 100644
index cb59e880de5..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.2.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "data": [
- {
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSyA4KHR4JzRv4r8F5w0u_secret_Jwn3Gjl2zNzpeBitPsfBeAqO6QlyIm0",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSyA4KHR4JzRv4r8F5w0u",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/setup_intents"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.3.json
deleted file mode 100644
index 21cf11a6688..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.list.3.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "data": [
- {
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItT6A4KHR4JzRvXRrk3ZWq_secret_Jwn3gQ5ouf7fuzUaAufLXo3PVNtpLK9",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItT6A4KHR4JzRvXRrk3ZWq",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/setup_intents"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.1.json
deleted file mode 100644
index 337728aafe0..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.1.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSlA4KHR4JzRvR6Rwwr7M_secret_Jwn2lXV2MSEZKWF3wSVdeO7lc0vuJG5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSlA4KHR4JzRvR6Rwwr7M",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItSlA4KHR4JzRv7fAlEWY9",
- "livemode": false,
- "mandate": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSjA4KHR4JzRvOLviKqCQ",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.2.json
deleted file mode 100644
index ee5bd192c2f..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.2.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItSzA4KHR4JzRvhV3hBuoI_secret_Jwn3R0Urx34VCSRVhtzeSybhx5QLfbv",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItSzA4KHR4JzRvhV3hBuoI",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItSzA4KHR4JzRvyl097UvX",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItSyA4KHR4JzRv1Y1r16Ay",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.3.json
deleted file mode 100644
index f17b930b6b3..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--SetupIntent.retrieve.3.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "application": null,
- "cancellation_reason": null,
- "client_secret": "seti_1JItT8A4KHR4JzRvbFwlwx9D_secret_Jwn3yh4lQUxNyuCFJbvla6fhpbuJznt",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "id": "seti_1JItT8A4KHR4JzRvbFwlwx9D",
- "last_setup_error": null,
- "latest_attempt": "setatt_1JItT8A4KHR4JzRv01Rk9HCf",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1JItT7A4KHR4JzRvp5lQOWqG",
- "payment_method_options": {
- "card": {
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.1.json
deleted file mode 100644
index 0e8aeb9c2ac..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.1.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/upgrade/",
- "client_reference_id": null,
- "currency": null,
- "customer": "cus_NORMALIZED0001",
- "customer_details": null,
- "customer_email": null,
- "id": "cs_test_NORMALIZED01EPECFRMhw7UNNmswnL1GlYzHKmeHmWpfl5Jpe78ESnqK62",
- "livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "setup_intent": "seti_1JItSjA4KHR4JzRv9tSAgsFv",
- "shipping": null,
- "shipping_address_collection": null,
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "url": "https://checkout.stripe.com/pay/cs_test_NORMALIZED01EPECFRMhw7UNNmswnL1GlYzHKmeHmWpfl5Jpe78ESnqK62#fidkdWxOYHwnPyd1blpxYHZxWjA0T0NCb2ZEMU5NVzFPf1dzRlZLQXBfNm9%2FUm9kXGcydWZXamJSYV9MMjdWPUBwdTdQXzVQbWFfdGl8dUB8YWRRSFFrRnI8VlFVTVF9UTNXUVJoVzNAf2hKNTVmdnxiaDZ3QicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.2.json
deleted file mode 100644
index da39b9ee5cd..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.2.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "currency": null,
- "customer": "cus_NORMALIZED0001",
- "customer_details": null,
- "customer_email": null,
- "id": "cs_test_NORMALIZED02XZkCnli4qbWit3T1APuzI3rj2qkSkZ0iz24HHIp2EjgVMv",
- "livemode": false,
- "locale": null,
- "metadata": {
- "type": "card_update"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "setup_intent": "seti_1JItSyA4KHR4JzRv4r8F5w0u",
- "shipping": null,
- "shipping_address_collection": null,
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "url": "https://checkout.stripe.com/pay/cs_test_NORMALIZED02XZkCnli4qbWit3T1APuzI3rj2qkSkZ0iz24HHIp2EjgVMv#fidkdWxOYHwnPyd1blpxYHZxWjA0T0NCb2ZEMU5NVzFPf1dzRlZLQXBfNm9%2FUm9kXGcydWZXamJSYV9MMjdWPUBwdTdQXzVQbWFfdGl8dUB8YWRRSFFrRnI8VlFVTVF9UTNXUVJoVzNAf2hKNTVmdnxiaDZ3QicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.3.json
deleted file mode 100644
index 675f5abbd45..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.create.3.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "currency": null,
- "customer": "cus_NORMALIZED0001",
- "customer_details": null,
- "customer_email": null,
- "id": "cs_test_NORMALIZED03kNDyXXUBzC1CU3zYJopzvJOFN8Dmp9Bwg3OQOXmPZjSdCn",
- "livemode": false,
- "locale": null,
- "metadata": {
- "type": "card_update"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "setup_intent": "seti_1JItT6A4KHR4JzRvXRrk3ZWq",
- "shipping": null,
- "shipping_address_collection": null,
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "url": "https://checkout.stripe.com/pay/cs_test_NORMALIZED03kNDyXXUBzC1CU3zYJopzvJOFN8Dmp9Bwg3OQOXmPZjSdCn#fidkdWxOYHwnPyd1blpxYHZxWjA0T0NCb2ZEMU5NVzFPf1dzRlZLQXBfNm9%2FUm9kXGcydWZXamJSYV9MMjdWPUBwdTdQXzVQbWFfdGl8dUB8YWRRSFFrRnI8VlFVTVF9UTNXUVJoVzNAf2hKNTVmdnxiaDZ3QicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.1.json
deleted file mode 100644
index 9c54ed11c19..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.1.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "data": [
- {
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/upgrade/",
- "client_reference_id": null,
- "currency": null,
- "customer": "cus_NORMALIZED0001",
- "customer_details": null,
- "customer_email": null,
- "id": "cs_test_NORMALIZED01EPECFRMhw7UNNmswnL1GlYzHKmeHmWpfl5Jpe78ESnqK62",
- "livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "setup_intent": "seti_1JItSjA4KHR4JzRv9tSAgsFv",
- "shipping": null,
- "shipping_address_collection": null,
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "url": "https://checkout.stripe.com/pay/cs_test_NORMALIZED01EPECFRMhw7UNNmswnL1GlYzHKmeHmWpfl5Jpe78ESnqK62#fidkdWxOYHwnPyd1blpxYHZxWjA0T0NCb2ZEMU5NVzFPf1dzRlZLQXBfNm9%2FUm9kXGcydWZXamJSYV9MMjdWPUBwdTdQXzVQbWFfdGl8dUB8YWRRSFFrRnI8VlFVTVF9UTNXUVJoVzNAf2hKNTVmdnxiaDZ3QicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/checkout/sessions"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.2.json
deleted file mode 100644
index a57bdf6dce4..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.2.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "data": [
- {
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "currency": null,
- "customer": "cus_NORMALIZED0001",
- "customer_details": null,
- "customer_email": null,
- "id": "cs_test_NORMALIZED02XZkCnli4qbWit3T1APuzI3rj2qkSkZ0iz24HHIp2EjgVMv",
- "livemode": false,
- "locale": null,
- "metadata": {
- "type": "card_update"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "setup_intent": "seti_1JItSyA4KHR4JzRv4r8F5w0u",
- "shipping": null,
- "shipping_address_collection": null,
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "url": "https://checkout.stripe.com/pay/cs_test_NORMALIZED02XZkCnli4qbWit3T1APuzI3rj2qkSkZ0iz24HHIp2EjgVMv#fidkdWxOYHwnPyd1blpxYHZxWjA0T0NCb2ZEMU5NVzFPf1dzRlZLQXBfNm9%2FUm9kXGcydWZXamJSYV9MMjdWPUBwdTdQXzVQbWFfdGl8dUB8YWRRSFFrRnI8VlFVTVF9UTNXUVJoVzNAf2hKNTVmdnxiaDZ3QicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/checkout/sessions"
-}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.3.json
deleted file mode 100644
index 1ba4634dfb7..00000000000
--- a/corporate/tests/stripe_fixtures/replace_payment_source--checkout.Session.list.3.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "data": [
- {
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "currency": null,
- "customer": "cus_NORMALIZED0001",
- "customer_details": null,
- "customer_email": null,
- "id": "cs_test_NORMALIZED03kNDyXXUBzC1CU3zYJopzvJOFN8Dmp9Bwg3OQOXmPZjSdCn",
- "livemode": false,
- "locale": null,
- "metadata": {
- "type": "card_update"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "setup_intent": "seti_1JItT6A4KHR4JzRvXRrk3ZWq",
- "shipping": null,
- "shipping_address_collection": null,
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "url": "https://checkout.stripe.com/pay/cs_test_NORMALIZED03kNDyXXUBzC1CU3zYJopzvJOFN8Dmp9Bwg3OQOXmPZjSdCn#fidkdWxOYHwnPyd1blpxYHZxWjA0T0NCb2ZEMU5NVzFPf1dzRlZLQXBfNm9%2FUm9kXGcydWZXamJSYV9MMjdWPUBwdTdQXzVQbWFfdGl8dUB8YWRRSFFrRnI8VlFVTVF9UTNXUVJoVzNAf2hKNTVmdnxiaDZ3QicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/checkout/sessions"
-}
diff --git a/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--PaymentIntent.create.1.json
deleted file mode 100644
index 1c793a97ba5..00000000000
--- a/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--PaymentIntent.create.1.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "amount": 4800,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_N4uxvoVS3SKiVGvKttgGeLNs4",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $8.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.modify.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.modify.1.json
index cfb6bfbb77f..51c976d53c4 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "default_payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.1.json
index c0e4a6df6d8..c626eafd763 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.1.json
@@ -2,8 +2,8 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "id": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.2.json
new file mode 100644
index 00000000000..c626eafd763
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.3.json
new file mode 100644
index 00000000000..c626eafd763
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.4.json
new file mode 100644
index 00000000000..c626eafd763
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.5.json
new file mode 100644
index 00000000000..be0b9e5a1b4
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.1.json
index 77d1fbe6523..61e190daecf 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.1.json
@@ -5,49 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfDDEQaroqDjs5IVz2ctz_secret_OyYmgaoWBMVuCJtC2Mb4o8EZ66Sqje3",
+ "address": null,
+ "balance": 0,
"created": 1000000000,
- "customer": "cus_NORMALIZED0002",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfDDEQaroqDjs5IVz2ctz",
- "last_setup_error": null,
- "latest_attempt": null,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
+ "footer": null,
+ "rendering_options": null
+ },
"livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbfDDEQaroqDjsfP9Uyv8c",
+ "id": "evt_1ODZaHDEQaroqDjsljofjeF2",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "c64508ea-0ba2-44d5-adaa-a2f3d9008446"
+ "idempotency_key": "abd6e334-3a4a-4bd8-a4b8-2afb8a7514e5"
},
- "type": "setup_intent.created"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.2.json
index 09f2d813576..25b317fc44f 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.2.json
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"payment_method_details": {
"card": {
"amount_authorized": 4800,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKM-itKoGMgYE08d-HZU6LBY0aslkki_awVo8xx8259IBGBfoUGOp014QrLy5BxGXsMWGWa4Lp3pzhwdz",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPS136oGMgabJYL3iBA6LBa-omfT3qew4OpIgW-_cnZNxGn9hTb0aIChPUpWCHcNrJ8ra-8WnDBwvexu",
"refunded": false,
"refunds": {
"data": [],
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_kylb80BjRsrDJeLMehiJgOcnp",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Ow0JCIbU8lZzeGCVp85NO4tYI",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbfIDEQaroqDjs1xy2i6ku",
+ "id": "evt_3ODZaJDEQaroqDjs1pjOWa5X",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "a169925e-7a60-44a8-b02a-c3d589902ac2"
+ "idempotency_key": "8c5c85a3-a80f-4b04-b725-8631aee7a5f9"
},
"type": "payment_intent.succeeded"
},
@@ -279,7 +279,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"payment_method_details": {
"card": {
"amount_authorized": 4800,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKM-itKoGMgYcM6IPII86LBbZBuseZCHdI2084H98PyDd6wc6jhU_yz1BpWnKYBg5nNsaxHPgiblQPqV3",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPS136oGMgZIg828sew6LBYFngtgajsRnFMNaJrLmjdExNFIu75_DT5KxiPB_zmwyDdofkBM7WtBgP1X",
"refunded": false,
"refunds": {
"data": [],
@@ -341,278 +341,16 @@
"transfer_group": null
}
},
- "id": "evt_3OAbfIDEQaroqDjs1ipHcldJ",
+ "id": "evt_3ODZaJDEQaroqDjs1wvLLpgW",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "a169925e-7a60-44a8-b02a-c3d589902ac2"
+ "idempotency_key": "8c5c85a3-a80f-4b04-b725-8631aee7a5f9"
},
"type": "charge.succeeded"
},
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbfMDEQaroqDjs5blVYJAY",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "103a2f0a-cd22-49b1-a753-cb606e0b5ddd"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfKDEQaroqDjsZ3hJhwmk_secret_OyYmt0RqekK3Y0NFPfbgpdxlrWaOmIA",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfKDEQaroqDjsZ3hJhwmk",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbfKDEQaroqDjsp7eaNU3O",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbfLDEQaroqDjsvOeujGwE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "41402b51-97fa-49d8-9cc3-e1131e54f5a1"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbfLDEQaroqDjsaeTBBGLk",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "41402b51-97fa-49d8-9cc3-e1131e54f5a1"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfKDEQaroqDjsZ3hJhwmk_secret_OyYmt0RqekK3Y0NFPfbgpdxlrWaOmIA",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfKDEQaroqDjsZ3hJhwmk",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbfKDEQaroqDjsp7eaNU3O",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbfLDEQaroqDjsa2OqaaIy",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "41402b51-97fa-49d8-9cc3-e1131e54f5a1"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfJDEQaroqDjs0wbDn3Rs_secret_OyYmmsGXfxyCvUNfKXW2cpdQIk8D1z0",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfJDEQaroqDjs0wbDn3Rs",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbfJDEQaroqDjsZLvk5DJ4",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "e4824abf-fb54-42ea-965c-a7fa582f1e76"
- },
- "type": "setup_intent.created"
- },
{
"api_version": "2020-08-27",
"created": 1000000000,
@@ -637,7 +375,7 @@
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_kylb80BjRsrDJeLMehiJgOcnp",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Ow0JCIbU8lZzeGCVp85NO4tYI",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -690,63 +428,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbfIDEQaroqDjs1kScZwzL",
+ "id": "evt_3ODZaJDEQaroqDjs1CtBX5q5",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "99f17667-404c-4b2e-8f6b-23e5deac4979"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "8c5c85a3-a80f-4b04-b725-8631aee7a5f9"
},
"type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbfHDEQaroqDjsDBGmDV0y",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "12d53533-0f2e-4eb1-a14b-851c4827dc32"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.3.json
index 3077b99ba29..fb439a592e2 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.3.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI102003QZpSyFg?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAy0200Mx2BQ3P8?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI102003QZpSyFg/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAy0200Mx2BQ3P8/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -210,230 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbfVDEQaroqDjssR7KR8K2",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "aaaa1167-6b2f-4771-84ad-ef2cdc410a62"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI002000ljRTOLq?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI002000ljRTOLq/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 4800,
- "amount_excluding_tax": 4800,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1328151845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 800,
- "unit_amount_decimal": "800"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "800"
- },
- {
- "amount": -4800,
- "amount_excluding_tax": -4800,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -4800,
- "unit_amount_decimal": "-4800"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-4800"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -457,13 +234,13 @@
}
}
},
- "id": "evt_1OAbfUDEQaroqDjsWH3D20bJ",
+ "id": "evt_1ODZaMDEQaroqDjs9ZzwOHu3",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "aaaa1167-6b2f-4771-84ad-ef2cdc410a62"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "5f0791db-c6a8-4072-87ea-4488f7d470c8"
},
"type": "invoice.updated"
},
@@ -680,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbfTDEQaroqDjsnl3bAbKQ",
+ "id": "evt_1ODZaMDEQaroqDjsAYqEsF0o",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "1bfaa19f-2ade-4597-b80e-7baf6aa92d52"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "398a7250-a391-4591-a579-fa5bf08daf00"
},
"type": "invoice.created"
},
@@ -742,13 +519,13 @@
"unit_amount_decimal": "800"
}
},
- "id": "evt_1OAbfSDEQaroqDjsMIABDjiN",
+ "id": "evt_1ODZaLDEQaroqDjsCMKB9eM1",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "44ca9f29-0fb6-44a5-a6ab-1c8942e32315"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "56a4508a-0b3f-49e7-b7b1-c9235b4b0ac5"
},
"type": "invoiceitem.created"
},
@@ -804,13 +581,13 @@
"unit_amount_decimal": "-4800"
}
},
- "id": "evt_1OAbfRDEQaroqDjslHyhxnmp",
+ "id": "evt_1ODZaLDEQaroqDjsYmPpuUfd",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "12b00bc1-bfca-479b-965d-6ef0dcdc9326"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "fee22671-40a4-47d4-9dd0-8c0d9104d17c"
},
"type": "invoiceitem.created"
},
@@ -833,7 +610,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "default_payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"footer": null,
"rendering_options": null
},
@@ -856,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbfRDEQaroqDjsu9xdTLDw",
+ "id": "evt_1ODZaLDEQaroqDjsgoMifPVH",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "12b00bc1-bfca-479b-965d-6ef0dcdc9326"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "fee22671-40a4-47d4-9dd0-8c0d9104d17c"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.4.json
index df4d9c1dc06..4c0c678ab81 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.4.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI102003QZpSyFg?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAz0200ozPtTMLZ?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI102003QZpSyFg/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAz0200ozPtTMLZ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -210,18 +210,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbfVDEQaroqDjskMbIsNwo",
+ "id": "evt_1ODZaNDEQaroqDjsd84pO3hW",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "aaaa1167-6b2f-4771-84ad-ef2cdc410a62"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "5f0791db-c6a8-4072-87ea-4488f7d470c8"
},
- "type": "invoice.payment_succeeded"
+ "type": "invoice.paid"
},
{
"api_version": "2020-08-27",
@@ -269,9 +269,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI102003QZpSyFg?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAy0200Mx2BQ3P8?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI102003QZpSyFg/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAy0200Mx2BQ3P8/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -433,18 +433,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbfVDEQaroqDjs6C2pJfIO",
+ "id": "evt_1ODZaMDEQaroqDjsSXeRCCxg",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "aaaa1167-6b2f-4771-84ad-ef2cdc410a62"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "5f0791db-c6a8-4072-87ea-4488f7d470c8"
},
- "type": "invoice.paid"
+ "type": "invoice.finalized"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.5.json
index 6d922067afe..9de43cde457 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.5.json
@@ -1,5 +1,229 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAz0200ozPtTMLZ?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAz0200ozPtTMLZ/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 4800,
+ "amount_excluding_tax": 4800,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1328151845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 800,
+ "unit_amount_decimal": "800"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "800"
+ },
+ {
+ "amount": -4800,
+ "amount_excluding_tax": -4800,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -4800,
+ "unit_amount_decimal": "-4800"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-4800"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZaNDEQaroqDjs2ltyzmTL",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "5f0791db-c6a8-4072-87ea-4488f7d470c8"
+ },
+ "type": "invoice.payment_succeeded"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.9.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.6.json
similarity index 100%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.9.json
rename to corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Event.list.6.json
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.1.json
index 849fe1fb6e5..49469de5711 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI002000ljRTOLq?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAy0200Mx2BQ3P8?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzI002000ljRTOLq/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzAy0200Mx2BQ3P8/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.2.json
index 436b4c867f8..c2481b01395 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzI402006wE8546x?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzA10200XEJpZu7S?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzI402006wE8546x/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzA10200XEJpZu7S/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 11200,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.3.json
index 048d339db79..7fd5a128813 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.3.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzMx0200M2txUIaJ?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzA30200GdRbmzLe?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzMx0200M2txUIaJ/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzA30200GdRbmzLe/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -204,5 +204,5 @@
"total_excluding_tax": 200000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.4.json
index 482bd843442..eb657d3fdc4 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.4.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud2I2a3p1RThsbzZGU3ptSGRZNmVMVHMxek1lLDkwMDkwMzM10200J4xzH9vH?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxY2xlc0E5QzF4M0tQQjBxN2VrV0J1UU9yVTFxLDkwNzk3MzA50200yRt9qpnm?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud2I2a3p1RThsbzZGU3ptSGRZNmVMVHMxek1lLDkwMDkwMzM10200J4xzH9vH/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxY2xlc0E5QzF4M0tQQjBxN2VrV0J1UU9yVTFxLDkwNzk3MzA50200yRt9qpnm/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 36830,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.5.json
index e9a11731f6e..5e3110fc048 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.5.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.finalize_invoice.5.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXpIMG15UXRWMHN5R0ZpWWc4bWRlNU5vQmxqLDkwMDkwMzQw0200DTDRNkNb?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxT1lZZWp3d3phQWxyNlVZZ1VBOVZMZVhUdVBjLDkwNzk3MzEy02000uHmRGTG?s=ap",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXpIMG15UXRWMHN5R0ZpWWc4bWRlNU5vQmxqLDkwMDkwMzQw0200DTDRNkNb/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxT1lZZWp3d3phQWxyNlVZZ1VBOVZMZVhUdVBjLDkwNzk3MzEy02000uHmRGTG/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 240000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.2.json
index 17ee56b6938..3be98777aa7 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzMy0200XF2Pauef?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzA40200yRRIOQKk?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzMy0200XF2Pauef/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzA40200yRRIOQKk/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -206,7 +206,7 @@
"total_excluding_tax": 200000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -250,9 +250,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzMy0200I5KRuuY1?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzA402004coDIXQf?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzMy0200I5KRuuY1/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzA402004coDIXQf/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -408,9 +408,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzMy0200ELu3jhkC?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzA40200jh59spxy?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzMy0200ELu3jhkC/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzA40200jh59spxy/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.3.json
index ad5fa9d19c8..8ab3c4cff7b 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.3.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud2I2a3p1RThsbzZGU3ptSGRZNmVMVHMxek1lLDkwMDkwMzM30200UMWq3mri?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxY2xlc0E5QzF4M0tQQjBxN2VrV0J1UU9yVTFxLDkwNzk3MzEw02006xYZ9WbP?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud2I2a3p1RThsbzZGU3ptSGRZNmVMVHMxek1lLDkwMDkwMzM30200UMWq3mri/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxY2xlc0E5QzF4M0tQQjBxN2VrV0J1UU9yVTFxLDkwNzk3MzEw02006xYZ9WbP/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 36830,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzM30200qJw3TWsz?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzEw02007qVHRh06?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzM30200qJw3TWsz/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzEw02007qVHRh06/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -408,9 +408,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzM30200pdCLTQwB?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzEw0200XadudYaL?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzM30200pdCLTQwB/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzEw0200XadudYaL/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -566,9 +566,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzM30200mXeRUhVK?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzEw0200lQ4dIjVe?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzM30200mXeRUhVK/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzEw0200lQ4dIjVe/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.4.json
index 2b43c480651..7460d3d0efd 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXpIMG15UXRWMHN5R0ZpWWc4bWRlNU5vQmxqLDkwMDkwMzQx02000KmAyrSz?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxT1lZZWp3d3phQWxyNlVZZ1VBOVZMZVhUdVBjLDkwNzk3MzEy02000uHmRGTG?s=ap",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXpIMG15UXRWMHN5R0ZpWWc4bWRlNU5vQmxqLDkwMDkwMzQx02000KmAyrSz/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxT1lZZWp3d3phQWxyNlVZZ1VBOVZMZVhUdVBjLDkwNzk3MzEy02000uHmRGTG/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 240000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud2I2a3p1RThsbzZGU3ptSGRZNmVMVHMxek1lLDkwMDkwMzQx02007z77CIIL?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxY2xlc0E5QzF4M0tQQjBxN2VrV0J1UU9yVTFxLDkwNzk3MzEy0200nb17Yk5w?s=ap",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud2I2a3p1RThsbzZGU3ptSGRZNmVMVHMxek1lLDkwMDkwMzQx02007z77CIIL/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxY2xlc0E5QzF4M0tQQjBxN2VrV0J1UU9yVTFxLDkwNzk3MzEy0200nb17Yk5w/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -358,9 +358,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzQx0200qrYVVL76?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzEy0200jXoBO8qZ?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluZjFQeVlZcER3MDBDUE82Q29YME9nU0ZFcVY1LDkwMDkwMzQx0200qrYVVL76/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSGhLR0Z4QlZXUzF0S002RllvcE15ZGNoSnpvLDkwNzk3MzEy0200jXoBO8qZ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -566,9 +566,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzQx020013w5XsqX?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzEy0200HljQItiO?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVludzhEWmlzQzhZQkR5VkN0anZjNTJYaTVGRmRVLDkwMDkwMzQx020013w5XsqX/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxSU0wQXluM2I3T3hYUnJHcnVWWm1rdzlrTTZjLDkwNzk3MzEy0200HljQItiO/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -724,9 +724,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzQx0200AuitWKj3?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzEy0200xsTcHbNo?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluTHJvZFg5d00wVnNvZXBFbjV2dVRtaFZEZXkyLDkwMDkwMzQx0200AuitWKj3/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaUh0UFZrM3NBbFgwY2VNRG5YcjBPZGpPbGhMLDkwNzk3MzEy0200xsTcHbNo/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.confirm.1.json
deleted file mode 100644
index 7473cc2038a..00000000000
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 4800,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 4800,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 4800,
- "amount_captured": 4800,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $8.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
- "payment_method_details": {
- "card": {
- "amount_authorized": 4800,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 4800,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKM-itKoGMgaCRy6aNHU6LBa-pr-xmRINQaKylpbhQMQjVZ0YqLp9xNb6AREw0b12j1AfTUx0yQ52Mwet",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_kylb80BjRsrDJeLMehiJgOcnp",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $8.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.create.1.json
index 895d3908694..303a52b44dd 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 4800,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,13 +12,138 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 4800,
+ "amount_captured": 4800,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $8.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "2",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "800",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 4800,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 4800,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPS136oGMgZmNfNLlMQ6LBbgW7dzyOOW6nuuZUeIapkO9GsyzybpG8rTS-TczUXe295IDIjeJjBY0q44",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
+ "total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_kylb80BjRsrDJeLMehiJgOcnp",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Ow0JCIbU8lZzeGCVp85NO4tYI",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -27,7 +152,7 @@
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.create.1.json
index fbc208704da..da82fa59f6c 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbfKDEQaroqDjsZ3hJhwmk_secret_OyYmt0RqekK3Y0NFPfbgpdxlrWaOmIA",
+ "client_secret": "seti_1ODZaFDEQaroqDjs1EMXje3z_secret_P1cpOJ0Fg3QzF4c14DjFLYyJeo97J5R",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbfKDEQaroqDjsZ3hJhwmk",
+ "id": "seti_1ODZaFDEQaroqDjs1EMXje3z",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbfKDEQaroqDjsp7eaNU3O",
+ "latest_attempt": "setatt_1ODZaFDEQaroqDjsSxVvtnoj",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.list.1.json
index c9cde9f4e7b..39007be80fc 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbfJDEQaroqDjs0wbDn3Rs_secret_OyYmmsGXfxyCvUNfKXW2cpdQIk8D1z0",
+ "client_secret": "seti_1ODZaEDEQaroqDjsAVN7197I_secret_P1cpm7v1id7dcvrnQhyVp6zFOSRf3zf",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbfJDEQaroqDjs0wbDn3Rs",
+ "id": "seti_1ODZaEDEQaroqDjsAVN7197I",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.retrieve.1.json
index fbc208704da..da82fa59f6c 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbfKDEQaroqDjsZ3hJhwmk_secret_OyYmt0RqekK3Y0NFPfbgpdxlrWaOmIA",
+ "client_secret": "seti_1ODZaFDEQaroqDjs1EMXje3z_secret_P1cpOJ0Fg3QzF4c14DjFLYyJeo97J5R",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbfKDEQaroqDjsZ3hJhwmk",
+ "id": "seti_1ODZaFDEQaroqDjs1EMXje3z",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbfKDEQaroqDjsp7eaNU3O",
+ "latest_attempt": "setatt_1ODZaFDEQaroqDjsSxVvtnoj",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbfKDEQaroqDjsqKWDDQqx",
+ "payment_method": "pm_1ODZaFDEQaroqDjsUC0WtuQT",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.create.1.json
index 4ea5bd1f624..14f15ce774b 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02bEPHF0y6gfMfgW06baEZkaKjb2B0jKWfj2EM002Av1A8VB",
+ "id": "cs_test_NORMALIZED02nykTOsjPELSQyXm6ncqXVPCF7V0QDLPVbYTMxR90v0YrIT",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbfJDEQaroqDjs0wbDn3Rs",
+ "setup_intent": "seti_1ODZaEDEQaroqDjsAVN7197I",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02bEPHF0y6gfMfgW06baEZkaKjb2B0jKWfj2EM002Av1A8VB#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02nykTOsjPELSQyXm6ncqXVPCF7V0QDLPVbYTMxR90v0YrIT#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.list.1.json
index 3d2fcd73a35..e8425245f68 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02bEPHF0y6gfMfgW06baEZkaKjb2B0jKWfj2EM002Av1A8VB",
+ "id": "cs_test_NORMALIZED02nykTOsjPELSQyXm6ncqXVPCF7V0QDLPVbYTMxR90v0YrIT",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbfJDEQaroqDjs0wbDn3Rs",
+ "setup_intent": "seti_1ODZaEDEQaroqDjsAVN7197I",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02bEPHF0y6gfMfgW06baEZkaKjb2B0jKWfj2EM002Av1A8VB#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02nykTOsjPELSQyXm6ncqXVPCF7V0QDLPVbYTMxR90v0YrIT#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.modify.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.modify.1.json
index e6e349c2323..50232bf4220 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "default_payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.1.json
index c0e73d4eec9..02afbbfed6a 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.1.json
@@ -2,8 +2,8 @@
"address": null,
"balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -54,7 +54,7 @@
},
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "id": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -69,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.2.json
new file mode 100644
index 00000000000..02afbbfed6a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaYDEQaroqDjsycoc4W1M",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.3.json
new file mode 100644
index 00000000000..02afbbfed6a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaYDEQaroqDjsycoc4W1M",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.4.json
new file mode 100644
index 00000000000..02afbbfed6a
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaYDEQaroqDjsycoc4W1M",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.5.json
new file mode 100644
index 00000000000..6841c024df6
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZaYDEQaroqDjsycoc4W1M",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.1.json
index 6d7a8ece0be..9f626e49fcf 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.1.json
@@ -5,173 +5,53 @@
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 240000,
- "amount_paid": 0,
- "amount_remaining": 240000,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
+ "address": null,
+ "balance": 0,
"created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXpIMG15UXRWMHN5R0ZpWWc4bWRlNU5vQmxqLDkwMDkwMzQw0200DTDRNkNb?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXpIMG15UXRWMHN5R0ZpWWc4bWRlNU5vQmxqLDkwMDkwMzQx02000KmAyrSz/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 240000,
- "amount_excluding_tax": 240000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1391310245,
- "start": 1359774245
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 30,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 240000,
- "subtotal_excluding_tax": 240000,
- "tax": null,
- "test_clock": null,
- "total": 240000,
- "total_discount_amounts": [],
- "total_excluding_tax": 240000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbflDEQaroqDjs0hCgMGQF",
+ "id": "evt_1ODZaaDEQaroqDjslxYeL2lc",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "325700cb-0ed6-4261-ad7e-78e152a35252"
+ "idempotency_key": "97f57383-0d25-4361-a1da-ba27bfb272c0"
},
- "type": "invoice.finalized"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.2.json
index 395488ff125..b27747d4a00 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.2.json
@@ -81,8 +81,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"payment_method_details": {
"card": {
"amount_authorized": 28000,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKO-itKoGMgZptLUKpGE6LBYtqIavBSTM5l9YwMxxM7bh4dqeSRBUggbk_G2nY9-Uj2RXqwXmtdtuhXas",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIe236oGMgYxyc5rxuI6LBbXBpzDUiaRmdKQJkY-9Mg2AGR7XP_Fcn6bn2rZAEf_7bJGxJ9F6GAskIaR",
"refunded": false,
"refunds": {
"data": [],
@@ -147,15 +147,15 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_tS6HL7jjpEDvdV6ZRr6xT1TR2",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Mj6Rx3XAUf2KFHtmFliTEIkb8",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $8.0 x 35",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_NORMALIZED00000000000001",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,13 +202,13 @@
"transfer_group": null
}
},
- "id": "evt_3OAbfoDEQaroqDjs1AVoG3Yt",
+ "id": "evt_3ODZacDEQaroqDjs0ZXyseJm",
"livemode": false,
"object": "event",
- "pending_webhooks": 1,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "5fcbe263-fd51-4c6d-81d2-89f0c2bc35ac"
+ "idempotency_key": "a0313505-0d0a-4c27-98e4-79d54954fa1e"
},
"type": "payment_intent.succeeded"
},
@@ -278,8 +278,8 @@
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"payment_method_details": {
"card": {
"amount_authorized": 28000,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKO-itKoGMgYz42J0-J06LBYWR1ZIywWMX1-g3iD2PvkgEZkkq-SVjnmwKkGIQmcNeanWuJmMzXSMgSsB",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIe236oGMgZ4vmqbZ4Y6LBYtyrFEdMnSTgSUFNceEQa8Ndwxxb4TQfCspm5tWhBeMsrlcciALCJSrtdJ",
"refunded": false,
"refunds": {
"data": [],
@@ -341,412 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbfoDEQaroqDjs1OXJjI4g",
+ "id": "evt_3ODZacDEQaroqDjs0DV7tr2j",
"livemode": false,
"object": "event",
- "pending_webhooks": 2,
+ "pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "5fcbe263-fd51-4c6d-81d2-89f0c2bc35ac"
+ "idempotency_key": "a0313505-0d0a-4c27-98e4-79d54954fa1e"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbfsDEQaroqDjsveksoY08",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "a31942c7-c9b9-405b-b26e-25ddb14a8074"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfqDEQaroqDjs5GO7lo7V_secret_OyYnXRNSSczIAinT7utTnSE1CjQgV44",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfqDEQaroqDjs5GO7lo7V",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbfqDEQaroqDjs6R15O3XB",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbfrDEQaroqDjs0h8cVeSZ",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c725649c-101c-4e4a-8a94-57d7c02fddb5"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbfrDEQaroqDjsqQaqcsY5",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c725649c-101c-4e4a-8a94-57d7c02fddb5"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfqDEQaroqDjs5GO7lo7V_secret_OyYnXRNSSczIAinT7utTnSE1CjQgV44",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfqDEQaroqDjs5GO7lo7V",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbfqDEQaroqDjs6R15O3XB",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbfrDEQaroqDjs0igcvITP",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "c725649c-101c-4e4a-8a94-57d7c02fddb5"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbfpDEQaroqDjs0C69FfpB_secret_OyYnh7uuZWrDiWgWXuae4Wk7B0o3ErM",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbfpDEQaroqDjs0C69FfpB",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbfpDEQaroqDjsKxqoVRRN",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "4a5ec4ab-f15d-4ae1-8c93-5c23fdbcc7e6"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 28000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_tS6HL7jjpEDvdV6ZRr6xT1TR2",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $8.0 x 35",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "manual",
- "licenses": "35",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbfoDEQaroqDjs1VX0mHHh",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "b3398459-03ac-4e81-abf7-61508a722f22"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbfnDEQaroqDjspmshvdlD",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "d19c646a-7064-4468-bafc-7fa77a218e0e"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.3.json
index ba021770503..43d233de902 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.3.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU10200CbvItOBN?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU10200CbvItOBN/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIx0200iFHaE90L?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIx0200iFHaE90L/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -111,234 +111,11 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -28000,
- "unit_amount_decimal": "-28000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-28000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbfzDEQaroqDjsiTPXHPX9",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "189abc35-59c3-4a0c-86db-ba2baa17942a"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU00200sMy6MKQD?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU00200sMy6MKQD/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 28000,
- "amount_excluding_tax": 28000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
"id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
- "period": {
- "end": 1328151845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 800,
- "unit_amount_decimal": "800"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 35,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "800"
- },
- {
- "amount": -28000,
- "amount_excluding_tax": -28000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
"period": {
"end": 1000000000,
"start": 1000000000
@@ -350,13 +127,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -380,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -433,7 +210,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
"previous_attributes": {
"attempted": false,
@@ -457,13 +234,13 @@
}
}
},
- "id": "evt_1OAbfzDEQaroqDjsdT060G6l",
+ "id": "evt_1ODZagDEQaroqDjs9fPEzth5",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "189abc35-59c3-4a0c-86db-ba2baa17942a"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "bdf93630-f160-49b9-aed8-0569464a4927"
},
"type": "invoice.updated"
},
@@ -514,7 +291,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -528,8 +305,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -544,13 +321,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -578,8 +355,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -594,13 +371,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -624,7 +401,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -680,13 +457,13 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbfxDEQaroqDjszb4vRyfy",
+ "id": "evt_1ODZafDEQaroqDjsbh34lH1q",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "fb5a1725-acc7-4c78-8b22-2b814b5cd834"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "e92e43fb-0f22-40a7-b493-a8026eac7ec5"
},
"type": "invoice.created"
},
@@ -702,7 +479,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -718,13 +495,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -742,13 +519,13 @@
"unit_amount_decimal": "800"
}
},
- "id": "evt_1OAbfwDEQaroqDjs2gAitRZs",
+ "id": "evt_1ODZaeDEQaroqDjsVZs0sAJ9",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "6e772b77-3729-45fd-b4ce-9d2fb8e2d6d0"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "ce1030a7-c8da-4c39-8808-f5bb0f18dfd4"
},
"type": "invoiceitem.created"
},
@@ -764,7 +541,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -780,13 +557,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -804,13 +581,13 @@
"unit_amount_decimal": "-28000"
}
},
- "id": "evt_1OAbfvDEQaroqDjsU2TFzd0L",
+ "id": "evt_1ODZaeDEQaroqDjs9ga4wWI2",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "bb036870-0aaf-430c-b0c0-9883ab546825"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "3329931a-4f1d-4322-a1a5-e14344eed8c8"
},
"type": "invoiceitem.created"
},
@@ -833,7 +610,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "default_payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"footer": null,
"rendering_options": null
},
@@ -856,13 +633,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbfvDEQaroqDjs5g15nq5T",
+ "id": "evt_1ODZaeDEQaroqDjs4NVqTtJ7",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "bb036870-0aaf-430c-b0c0-9883ab546825"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "3329931a-4f1d-4322-a1a5-e14344eed8c8"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.4.json
index e0ff06f3961..c659c09d1d7 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.4.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU10200CbvItOBN?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU10200CbvItOBN/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIy0200J16zfrhk?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIy0200J16zfrhk/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -61,8 +61,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -77,13 +77,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -111,234 +111,11 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -28000,
- "unit_amount_decimal": "-28000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-28000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbfzDEQaroqDjs6OstUKGO",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "189abc35-59c3-4a0c-86db-ba2baa17942a"
- },
- "type": "invoice.payment_succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU10200CbvItOBN?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU10200CbvItOBN/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 28000,
- "amount_excluding_tax": 28000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
"id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
- "period": {
- "end": 1328151845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 800,
- "unit_amount_decimal": "800"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 35,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "800"
- },
- {
- "amount": -28000,
- "amount_excluding_tax": -28000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
"period": {
"end": 1000000000,
"start": 1000000000
@@ -350,13 +127,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -380,12 +157,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -433,18 +210,18 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbfzDEQaroqDjs82O89tsc",
+ "id": "evt_1ODZagDEQaroqDjserlx3yWS",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "189abc35-59c3-4a0c-86db-ba2baa17942a"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "bdf93630-f160-49b9-aed8-0569464a4927"
},
- "type": "invoice.paid"
+ "type": "invoice.finalized"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.5.json
index 6d922067afe..6eb2a0d776e 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.5.json
@@ -1,5 +1,452 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIy0200J16zfrhk?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIy0200J16zfrhk/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 28000,
+ "amount_excluding_tax": 28000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1328151845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 800,
+ "unit_amount_decimal": "800"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 35,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "800"
+ },
+ {
+ "amount": -28000,
+ "amount_excluding_tax": -28000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -28000,
+ "unit_amount_decimal": "-28000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-28000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZagDEQaroqDjsd140shIo",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "bdf93630-f160-49b9-aed8-0569464a4927"
+ },
+ "type": "invoice.payment_succeeded"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIy0200J16zfrhk?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIy0200J16zfrhk/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 28000,
+ "amount_excluding_tax": 28000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1328151845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 800,
+ "unit_amount_decimal": "800"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 35,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "800"
+ },
+ {
+ "amount": -28000,
+ "amount_excluding_tax": -28000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -28000,
+ "unit_amount_decimal": "-28000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-28000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZagDEQaroqDjsGfd97rLG",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "bdf93630-f160-49b9-aed8-0569464a4927"
+ },
+ "type": "invoice.paid"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.6.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.6.json
new file mode 100644
index 00000000000..6d922067afe
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Event.list.6.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.1.json
index d9ade3f1b01..ad59ae6939a 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.1.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.2.json
index 45c3ee76d9c..1897e7efdff 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.2.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000003",
+ "id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,7 +101,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.3.json
index 51c98ef0726..1e88005772f 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.create.3.json
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000004",
+ "id": "in_NORMALIZED00000000000003",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,7 +101,7 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.1.json
index 15f5bfb0b9e..d5c733bfed4 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU00200sMy6MKQD?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzU00200sMy6MKQD/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIx0200iFHaE90L?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzIx0200iFHaE90L/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -121,13 +121,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,12 +151,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.2.json
index 32001802b84..c4a7b00002f 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluNUEycXh1dkZLa1g3Z2piR0pGWVZ6Ujc2bkhrLDkwMDkwMzYw0200Pl111bC1?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluNUEycXh1dkZLa1g3Z2piR0pGWVZ6Ujc2bkhrLDkwMDkwMzYw0200Pl111bC1/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaVdPejczMzRqMzBibG93UVJVb1dHSDBnWWhNLDkwNzk3MzI10200wwADohqQ?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaVdPejczMzRqMzBibG93UVJVb1dHSDBnWWhNLDkwNzk3MzI10200wwADohqQ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,17 +101,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0004",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -154,5 +154,5 @@
"total_excluding_tax": 280000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.3.json
index a31f359ac21..65b6a5d20b4 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.finalize_invoice.3.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud3A0WXRndHlxWkFiSno0b3VrSDFxNFplR0JiLDkwMDkwMzY00200qnFnr6V0?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud3A0WXRndHlxWkFiSno0b3VrSDFxNFplR0JiLDkwMDkwMzY00200qnFnr6V0/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxb2VNUlNoWUxCcE9Pa3RINnp0RGhiY3BOMkpZLDkwNzk3MzI302000jXSPaOo?s=ap",
+ "id": "in_NORMALIZED00000000000003",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxb2VNUlNoWUxCcE9Pa3RINnp0RGhiY3BOMkpZLDkwNzk3MzI302000jXSPaOo/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -71,13 +71,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -101,17 +101,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0005",
+ "number": "NORMALI-0004",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -154,5 +154,5 @@
"total_excluding_tax": 280000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.2.json
index 9a47f0857e2..b8e67baca08 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluNUEycXh1dkZLa1g3Z2piR0pGWVZ6Ujc2bkhrLDkwMDkwMzYx0200UXVVqUDh?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluNUEycXh1dkZLa1g3Z2piR0pGWVZ6Ujc2bkhrLDkwMDkwMzYx0200UXVVqUDh/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaVdPejczMzRqMzBibG93UVJVb1dHSDBnWWhNLDkwNzk3MzI10200wwADohqQ?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaVdPejczMzRqMzBibG93UVJVb1dHSDBnWWhNLDkwNzk3MzI10200wwADohqQ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -57,8 +57,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -73,13 +73,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -103,17 +103,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0004",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -156,7 +156,7 @@
"total_excluding_tax": 280000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzYx02009RDMWKeE?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzYx02009RDMWKeE/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzI10200j3OgZEn0?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzI10200j3OgZEn0/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -215,8 +215,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -231,13 +231,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -265,8 +265,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -281,13 +281,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -311,12 +311,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.3.json
index b22dd501106..471b3b1ed91 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.3.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud3A0WXRndHlxWkFiSno0b3VrSDFxNFplR0JiLDkwMDkwMzY10200vgEGVNPM?s=ap",
- "id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlud3A0WXRndHlxWkFiSno0b3VrSDFxNFplR0JiLDkwMDkwMzY10200vgEGVNPM/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxb2VNUlNoWUxCcE9Pa3RINnp0RGhiY3BOMkpZLDkwNzk3MzI302000jXSPaOo?s=ap",
+ "id": "in_NORMALIZED00000000000003",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxb2VNUlNoWUxCcE9Pa3RINnp0RGhiY3BOMkpZLDkwNzk3MzI302000jXSPaOo/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -57,8 +57,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000005",
- "invoice_item": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000004",
+ "invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -73,13 +73,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -103,17 +103,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000004/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0005",
+ "number": "NORMALI-0004",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000004",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -156,7 +156,7 @@
"total_excluding_tax": 280000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluNUEycXh1dkZLa1g3Z2piR0pGWVZ6Ujc2bkhrLDkwMDkwMzY10200rsQMoHi7?s=ap",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluNUEycXh1dkZLa1g3Z2piR0pGWVZ6Ujc2bkhrLDkwMDkwMzY10200rsQMoHi7/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaVdPejczMzRqMzBibG93UVJVb1dHSDBnWWhNLDkwNzk3MzI30200cdtt00f8?s=ap",
+ "id": "in_NORMALIZED00000000000002",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxaVdPejczMzRqMzBibG93UVJVb1dHSDBnWWhNLDkwNzk3MzI30200cdtt00f8/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -215,8 +215,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000003",
+ "invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -231,13 +231,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -261,17 +261,17 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0004",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
@@ -358,9 +358,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzY10200S9zKW3tT?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluYXBWb2g2blZ4MGhWVUtZSDdWOURUN0lYVlRBLDkwMDkwMzY10200S9zKW3tT/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzI30200EKC2Vmob?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxVmhtaTFBY1M0MG51WE1rUXdaYlg4MFNJUGw3LDkwNzk3MzI30200EKC2Vmob/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -373,8 +373,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -389,13 +389,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -423,8 +423,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -439,13 +439,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -469,12 +469,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.1.json
index 2798079afa7..bb17bb5a3a8 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.2.json
index 59f5bd962d0..e1fd50c8113 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.2.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.3.json
index 4e08d9c7fcd..2c96f1ade14 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.3.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard - renewal",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.4.json
index 484dc8e9acc..182ce6452ba 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--InvoiceItem.create.4.json
@@ -6,7 +6,7 @@
"description": "Zulip Cloud Standard - renewal",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "ii_NORMALIZED00000000000004",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -22,13 +22,13 @@
"created": 1000000000,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.confirm.1.json
deleted file mode 100644
index 756861ddcc6..00000000000
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 28000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 28000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 28000,
- "amount_captured": 28000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $8.0 x 35",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "manual",
- "licenses": "35",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
- "payment_method_details": {
- "card": {
- "amount_authorized": 28000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 28000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKO6itKoGMgY-e09tQFo6LBZGTrR4pDcxEADRg4Zozomcy_p1Rcdu-Us2GkoeeKbPHDgH4QIhUMLdcyI3",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_tS6HL7jjpEDvdV6ZRr6xT1TR2",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $8.0 x 35",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "manual",
- "licenses": "35",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.create.1.json
index 17269b1e677..d80c6d9826f 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 28000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 28000,
+ "amount_captured": 28000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $8.0 x 35",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "2",
+ "license_management": "manual",
+ "licenses": "35",
+ "price_per_license": "800",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 28000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 28000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIe236oGMgYgzKZ3PuA6LBYLd9omuQO1NEycxWjWrS-FUC2UkxSzcuFYhTCDkyyqUeerkVwyEVUOFMLp",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_tS6HL7jjpEDvdV6ZRr6xT1TR2",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_Mj6Rx3XAUf2KFHtmFliTEIkb8",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $8.0 x 35",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.create.1.json
index 701377f6d6d..ac1da13b16a 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbfqDEQaroqDjs5GO7lo7V_secret_OyYnXRNSSczIAinT7utTnSE1CjQgV44",
+ "client_secret": "seti_1ODZaYDEQaroqDjs3L9wdybL_secret_P1cqUXEZw9itHok2vAIWLwGBuciIUOi",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbfqDEQaroqDjs5GO7lo7V",
+ "id": "seti_1ODZaYDEQaroqDjs3L9wdybL",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbfqDEQaroqDjs6R15O3XB",
+ "latest_attempt": "setatt_1ODZaYDEQaroqDjsAeTevr76",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.list.1.json
index c9c4b8de71f..3d3ba2d48b0 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbfpDEQaroqDjs0C69FfpB_secret_OyYnh7uuZWrDiWgWXuae4Wk7B0o3ErM",
+ "client_secret": "seti_1ODZaXDEQaroqDjswrqY6Puh_secret_P1cqh4ynTwm3xMOPEL42JPr2BQVnose",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbfpDEQaroqDjs0C69FfpB",
+ "id": "seti_1ODZaXDEQaroqDjswrqY6Puh",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.retrieve.1.json
index 701377f6d6d..ac1da13b16a 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbfqDEQaroqDjs5GO7lo7V_secret_OyYnXRNSSczIAinT7utTnSE1CjQgV44",
+ "client_secret": "seti_1ODZaYDEQaroqDjs3L9wdybL_secret_P1cqUXEZw9itHok2vAIWLwGBuciIUOi",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbfqDEQaroqDjs5GO7lo7V",
+ "id": "seti_1ODZaYDEQaroqDjs3L9wdybL",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbfqDEQaroqDjs6R15O3XB",
+ "latest_attempt": "setatt_1ODZaYDEQaroqDjsAeTevr76",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbfqDEQaroqDjsuZKLhsLz",
+ "payment_method": "pm_1ODZaYDEQaroqDjsycoc4W1M",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.create.1.json
index 59c1345ca74..16184573277 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED029JG9jTkNtTPqVX7LpXPdcJZfdzQVyhallviMemVbSF3FCw",
+ "id": "cs_test_NORMALIZED02PeIcxUwcMRihhF6yYR5Z5i08kJzZrB2RzFwgB2CgJpTa0O",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "manual",
- "licenses": "35",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbfpDEQaroqDjs0C69FfpB",
+ "setup_intent": "seti_1ODZaXDEQaroqDjswrqY6Puh",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED029JG9jTkNtTPqVX7LpXPdcJZfdzQVyhallviMemVbSF3FCw#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02PeIcxUwcMRihhF6yYR5Z5i08kJzZrB2RzFwgB2CgJpTa0O#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.list.1.json
index 9073cb18487..4c44b8c7981 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED029JG9jTkNtTPqVX7LpXPdcJZfdzQVyhallviMemVbSF3FCw",
+ "id": "cs_test_NORMALIZED02PeIcxUwcMRihhF6yYR5Z5i08kJzZrB2RzFwgB2CgJpTa0O",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "2",
- "license_management": "manual",
- "licenses": "35",
- "price_per_license": "800",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbfpDEQaroqDjs0C69FfpB",
+ "setup_intent": "seti_1ODZaXDEQaroqDjswrqY6Puh",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED029JG9jTkNtTPqVX7LpXPdcJZfdzQVyhallviMemVbSF3FCw#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02PeIcxUwcMRihhF6yYR5Z5i08kJzZrB2RzFwgB2CgJpTa0O#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.finalize_invoice.1.json
index 5ffc5a06922..414a984985e 100644
--- a/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluUlFsQkxFWERaRTBRY1RiRXNvQk1XNXE1anVlLDkwMDkwMzY50200IABwbsoX?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxUW43THg4NGxpYkp1WlBGYkc1aEVYWWZuRnBULDkwNzk3MzMw0200l6cI0Ln4?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluUlFsQkxFWERaRTBRY1RiRXNvQk1XNXE1anVlLDkwMDkwMzY50200IABwbsoX/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxUW43THg4NGxpYkp1WlBGYkc1aEVYWWZuRnBULDkwNzk3MzMw0200l6cI0Ln4/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 14400,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.list.1.json b/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.list.1.json
index caec283a0f2..98610a33488 100644
--- a/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_realm_from_standard_to_plus_plan--Invoice.list.1.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluUlFsQkxFWERaRTBRY1RiRXNvQk1XNXE1anVlLDkwMDkwMzcw0200x7D0fQd5?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxUW43THg4NGxpYkp1WlBGYkc1aEVYWWZuRnBULDkwNzk3MzMw0200l6cI0Ln4?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVluUlFsQkxFWERaRTBRY1RiRXNvQk1XNXE1anVlLDkwMDkwMzcw0200x7D0fQd5/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNxUW43THg4NGxpYkp1WlBGYkc1aEVYWWZuRnBULDkwNzk3MzMw0200l6cI0Ln4/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"total_excluding_tax": 14400,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.create.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.create.1.json
deleted file mode 100644
index 24c4bc8fe17..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.create.1.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "account_balance": 0,
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.retrieve.1.json
deleted file mode 100644
index d3b72bc2df2..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.retrieve.1.json
+++ /dev/null
@@ -1,142 +0,0 @@
-{
- "account_balance": 0,
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_source": {
- "ach_credit_transfer": {
- "account_number": "test_NORMALIZED01",
- "bank_name": "TEST BANK",
- "fingerprint": "NORMALIZED000001",
- "refund_account_holder_name": null,
- "refund_account_holder_type": null,
- "refund_routing_number": null,
- "routing_number": "110000000",
- "swift_code": "TSTEZ122"
- },
- "amount": null,
- "client_secret": "src_client_secret_NORMALIZED00000000000001",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "flow": "receiver",
- "id": "src_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "source",
- "owner": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "verified_address": null,
- "verified_email": null,
- "verified_name": null,
- "verified_phone": null
- },
- "receiver": {
- "address": "000000000-test_NORMALIZED01",
- "amount_charged": 0,
- "amount_received": 0,
- "amount_returned": 0,
- "refund_attributes_method": "email",
- "refund_attributes_status": "missing"
- },
- "statement_descriptor": null,
- "status": "pending",
- "type": "ach_credit_transfer",
- "usage": "reusable"
- },
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 3,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "sources": {
- "data": [
- {
- "ach_credit_transfer": {
- "account_number": "test_NORMALIZED01",
- "bank_name": "TEST BANK",
- "fingerprint": "NORMALIZED000001",
- "refund_account_holder_name": null,
- "refund_account_holder_type": null,
- "refund_routing_number": null,
- "routing_number": "110000000",
- "swift_code": "TSTEZ122"
- },
- "amount": null,
- "client_secret": "src_client_secret_NORMALIZED00000000000001",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "flow": "receiver",
- "id": "src_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "source",
- "owner": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "verified_address": null,
- "verified_email": null,
- "verified_name": null,
- "verified_phone": null
- },
- "receiver": {
- "address": "000000000-test_NORMALIZED01",
- "amount_charged": 0,
- "amount_received": 0,
- "amount_returned": 0,
- "refund_attributes_method": "email",
- "refund_attributes_status": "missing"
- },
- "statement_descriptor": null,
- "status": "pending",
- "type": "ach_credit_transfer",
- "usage": "reusable"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/customers/cus_NORMALIZED0001/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.retrieve.2.json
deleted file mode 100644
index 339c1869f6f..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Customer.retrieve.2.json
+++ /dev/null
@@ -1,142 +0,0 @@
-{
- "account_balance": 0,
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_source": {
- "ach_credit_transfer": {
- "account_number": "test_NORMALIZED01",
- "bank_name": "TEST BANK",
- "fingerprint": "NORMALIZED000001",
- "refund_account_holder_name": null,
- "refund_account_holder_type": null,
- "refund_routing_number": null,
- "routing_number": "110000000",
- "swift_code": "TSTEZ122"
- },
- "amount": null,
- "client_secret": "src_client_secret_NORMALIZED00000000000001",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "flow": "receiver",
- "id": "src_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "source",
- "owner": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "verified_address": null,
- "verified_email": null,
- "verified_name": null,
- "verified_phone": null
- },
- "receiver": {
- "address": "000000000-test_NORMALIZED01",
- "amount_charged": 0,
- "amount_received": 0,
- "amount_returned": 0,
- "refund_attributes_method": "email",
- "refund_attributes_status": "missing"
- },
- "statement_descriptor": null,
- "status": "pending",
- "type": "ach_credit_transfer",
- "usage": "reusable"
- },
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 4,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "sources": {
- "data": [
- {
- "ach_credit_transfer": {
- "account_number": "test_NORMALIZED01",
- "bank_name": "TEST BANK",
- "fingerprint": "NORMALIZED000001",
- "refund_account_holder_name": null,
- "refund_account_holder_type": null,
- "refund_routing_number": null,
- "routing_number": "110000000",
- "swift_code": "TSTEZ122"
- },
- "amount": null,
- "client_secret": "src_client_secret_NORMALIZED00000000000001",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "flow": "receiver",
- "id": "src_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "source",
- "owner": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "verified_address": null,
- "verified_email": null,
- "verified_name": null,
- "verified_phone": null
- },
- "receiver": {
- "address": "000000000-test_NORMALIZED01",
- "amount_charged": 0,
- "amount_received": 0,
- "amount_returned": 0,
- "refund_attributes_method": "email",
- "refund_attributes_status": "missing"
- },
- "statement_descriptor": null,
- "status": "pending",
- "type": "ach_credit_transfer",
- "usage": "reusable"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/customers/cus_NORMALIZED0001/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0001/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.1.json
deleted file mode 100644
index a666cd6b1f2..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.1.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 800000,
- "amount_paid": 0,
- "amount_remaining": 800000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": null,
- "finalized_at": null,
- "footer": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 800000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7VD2X8vgpBNGEDWFERwd",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_Icola1rjDMk7Gn",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 100,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7VD2X8vgpBNG4ABCXBHM"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "paid": false,
- "payment_intent": null,
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 800000,
- "tax": null,
- "tax_percent": null,
- "total": 800000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.2.json
deleted file mode 100644
index 97d3c9e5309..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.2.json
+++ /dev/null
@@ -1,168 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 1600000,
- "amount_paid": 0,
- "amount_remaining": 1600000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": null,
- "finalized_at": null,
- "footer": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 1200000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7ZD2X8vgpBNG7tOz2g1t",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolNsCQAKuNp0",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 150,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7ZD2X8vgpBNG9BQP6hmG"
- },
- {
- "amount": 400000,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2012 - Jan 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7YD2X8vgpBNGoXXJJrxC",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolwKFOzzJdfY",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 50,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7YD2X8vgpBNG7m9DarDi"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "paid": false,
- "payment_intent": null,
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 1600000,
- "tax": null,
- "tax_percent": null,
- "total": 1600000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.3.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.3.json
deleted file mode 100644
index 9e321fb163b..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.create.3.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 960000,
- "amount_paid": 0,
- "amount_remaining": 960000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": null,
- "finalized_at": null,
- "footer": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 960000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1420167845,
- "start": 1388631845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7cD2X8vgpBNGuVEbvcBx",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolGnxXoZmJW6",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 120,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7cD2X8vgpBNGLTCwAmPa"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "paid": false,
- "payment_intent": null,
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 960000,
- "tax": null,
- "tax_percent": null,
- "total": 960000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.1.json
deleted file mode 100644
index 7591eb5af5a..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.1.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 800000,
- "amount_paid": 0,
- "amount_remaining": 800000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001yO4oh",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001yO4oh/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 800000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7VD2X8vgpBNGEDWFERwd",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_Icola1rjDMk7Gn",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 100,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7VD2X8vgpBNG4ABCXBHM"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7WD2X8vgpBNGlgnvL5Re",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 800000,
- "tax": null,
- "tax_percent": null,
- "total": 800000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.2.json
deleted file mode 100644
index 4c7724bbb2b..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.2.json
+++ /dev/null
@@ -1,168 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 1600000,
- "amount_paid": 0,
- "amount_remaining": 1600000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002VzefV",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002VzefV/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 1200000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7ZD2X8vgpBNG7tOz2g1t",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolNsCQAKuNp0",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 150,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7ZD2X8vgpBNG9BQP6hmG"
- },
- {
- "amount": 400000,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2012 - Jan 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7YD2X8vgpBNGoXXJJrxC",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolwKFOzzJdfY",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 50,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7YD2X8vgpBNG7m9DarDi"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7aD2X8vgpBNGZloSAnLC",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 1600000,
- "tax": null,
- "tax_percent": null,
- "total": 1600000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.3.json
deleted file mode 100644
index 9b241b11b59..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.finalize_invoice.3.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 960000,
- "amount_paid": 0,
- "amount_remaining": 960000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ODsSp",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ODsSp/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 960000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1420167845,
- "start": 1388631845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7cD2X8vgpBNGuVEbvcBx",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolGnxXoZmJW6",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 120,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7cD2X8vgpBNGLTCwAmPa"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7dD2X8vgpBNGCrOtv0tO",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 960000,
- "tax": null,
- "tax_percent": null,
- "total": 960000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.list.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.list.1.json
deleted file mode 100644
index ee0d61b1d64..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.list.1.json
+++ /dev/null
@@ -1,299 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 1600000,
- "amount_paid": 0,
- "amount_remaining": 1600000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002VzefV",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002VzefV/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 1200000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7ZD2X8vgpBNG7tOz2g1t",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolNsCQAKuNp0",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 150,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7ZD2X8vgpBNG9BQP6hmG"
- },
- {
- "amount": 400000,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2012 - Jan 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7YD2X8vgpBNGoXXJJrxC",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolwKFOzzJdfY",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 50,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7YD2X8vgpBNG7m9DarDi"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7aD2X8vgpBNGZloSAnLC",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 1600000,
- "tax": null,
- "tax_percent": null,
- "total": 1600000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- {
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 800000,
- "amount_paid": 0,
- "amount_remaining": 800000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001yO4oh",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001yO4oh/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 800000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7VD2X8vgpBNGEDWFERwd",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_Icola1rjDMk7Gn",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 100,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7VD2X8vgpBNG4ABCXBHM"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7WD2X8vgpBNGlgnvL5Re",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 800000,
- "tax": null,
- "tax_percent": null,
- "total": 800000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.list.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.list.2.json
deleted file mode 100644
index 293ca6da52d..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--Invoice.list.2.json
+++ /dev/null
@@ -1,423 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 960000,
- "amount_paid": 0,
- "amount_remaining": 960000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ODsSp",
- "id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ODsSp/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 960000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1420167845,
- "start": 1388631845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7cD2X8vgpBNGuVEbvcBx",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolGnxXoZmJW6",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 120,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7cD2X8vgpBNGLTCwAmPa"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000003/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7dD2X8vgpBNGCrOtv0tO",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 960000,
- "tax": null,
- "tax_percent": null,
- "total": 960000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- {
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 1600000,
- "amount_paid": 0,
- "amount_remaining": 1600000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002VzefV",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002VzefV/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 1200000,
- "currency": "usd",
- "description": "Zulip Cloud Standard - renewal",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7ZD2X8vgpBNG7tOz2g1t",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolNsCQAKuNp0",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 150,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7ZD2X8vgpBNG9BQP6hmG"
- },
- {
- "amount": 400000,
- "currency": "usd",
- "description": "Additional license (Jan 2, 2012 - Jan 2, 2013)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7YD2X8vgpBNGoXXJJrxC",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolwKFOzzJdfY",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 50,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7YD2X8vgpBNG7m9DarDi"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7aD2X8vgpBNGZloSAnLC",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 1600000,
- "tax": null,
- "tax_percent": null,
- "total": 1600000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- {
- "account_country": "US",
- "account_name": "Vishnu Test",
- "account_tax_ids": null,
- "amount_due": 800000,
- "amount_paid": 0,
- "amount_remaining": 800000,
- "application_fee": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "billing": "send_invoice",
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "date": 1000000000,
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": 1000000000,
- "ending_balance": 0,
- "finalized_at": 1000000000,
- "footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001yO4oh",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001yO4oh/pdf",
- "last_finalization_error": null,
- "lines": {
- "data": [
- {
- "amount": 800000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7VD2X8vgpBNGEDWFERwd",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_Icola1rjDMk7Gn",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 100,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I1Z7VD2X8vgpBNG4ABCXBHM"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "paid": false,
- "payment_intent": "pi_1I1Z7WD2X8vgpBNGlgnvL5Re",
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subtotal": 800000,
- "tax": null,
- "tax_percent": null,
- "total": 800000,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.1.json
deleted file mode 100644
index 48b3d16a104..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.1.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "amount": 800000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7VD2X8vgpBNGEDWFERwd",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_Icola1rjDMk7Gn",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 100,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.2.json
deleted file mode 100644
index 5af8b3ee994..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.2.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "amount": 400000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Additional license (Jan 2, 2012 - Jan 2, 2013)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7YD2X8vgpBNGoXXJJrxC",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolwKFOzzJdfY",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 50,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.3.json
deleted file mode 100644
index 89745c6828b..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.3.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "amount": 1200000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard - renewal",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1388631845,
- "start": 1357095845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7ZD2X8vgpBNG7tOz2g1t",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolNsCQAKuNp0",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 150,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.4.json
deleted file mode 100644
index ef608eac93d..00000000000
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan--InvoiceItem.create.4.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "amount": 960000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard - renewal",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000004",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1420167845,
- "start": 1388631845
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "id": "price_1I1Z7cD2X8vgpBNGuVEbvcBx",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_IcolGnxXoZmJW6",
- "recurring": null,
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 120,
- "subscription": null,
- "tax_rates": [],
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
-}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Event.list.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Event.list.1.json
index 944662af19d..36b87a61dd5 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Event.list.1.json
@@ -49,13 +49,13 @@
"usage": "reusable"
}
},
- "id": "evt_1OAbgEDEQaroqDjsw622Fibn",
+ "id": "evt_1ODZapDEQaroqDjsGqeB2quB",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": null,
- "idempotency_key": "df456f81-d7eb-4590-8f38-fe44dd28dbb6"
+ "idempotency_key": "1758e57d-f21b-47ff-8157-77c3da2c3fe3"
},
"type": "customer.source.created"
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.1.json
index 527a5ecc055..3182346c3b9 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluV3EwbXBrSEQzQ0ZRaHpzakRLVVBnYjBCNHRSLDkwMDkwMzc20200XOYjeDsb?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxVE5SbHNpSkxMRERKaVV5M3ZOZ1lQaUpneDR0LDkwNzk3MzMz0200awfuSaMC?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluV3EwbXBrSEQzQ0ZRaHpzakRLVVBnYjBCNHRSLDkwMDkwMzc20200XOYjeDsb/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxVE5SbHNpSkxMRERKaVV5M3ZOZ1lQaUpneDR0LDkwNzk3MzMz0200awfuSaMC/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 800000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.2.json
index dbf4cb459c9..5ff6edff1d2 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluQ0VJZW91SXR5emkyeVZad2tibTFYTEp4N01TLDkwMDkwMzc50200C6fXkyUQ?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxMjlMYXFQd0ZYR3JYWEZCbFZhbWNycEdUemRRLDkwNzk3MzM20200RqZdanwA?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluQ0VJZW91SXR5emkyeVZad2tibTFYTEp4N01TLDkwMDkwMzc50200C6fXkyUQ/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxMjlMYXFQd0ZYR3JYWEZCbFZhbWNycEdUemRRLDkwNzk3MzM20200RqZdanwA/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -204,5 +204,5 @@
"total_excluding_tax": 1600000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.3.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.3.json
index 03aa31e9544..36c406e8375 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.3.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.finalize_invoice.3.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlvSHRkQzd3S2w1cmxvRmptMEtXTm1pMTJuNENiLDkwMDkwMzg00200Kj4l6m50?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxTjFHNmRON0FyTFBVQXhHNHplTUhNZHpoRkRwLDkwNzk3MzM40200uxuseW5D?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlvSHRkQzd3S2w1cmxvRmptMEtXTm1pMTJuNENiLDkwMDkwMzg00200Kj4l6m50/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxTjFHNmRON0FyTFBVQXhHNHplTUhNZHpoRkRwLDkwNzk3MzM40200uxuseW5D/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 960000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.1.json
index 45ba1d48a3f..bd81274ffd0 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.1.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluQ0VJZW91SXR5emkyeVZad2tibTFYTEp4N01TLDkwMDkwMzgx0200XAaTFtcK?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxMjlMYXFQd0ZYR3JYWEZCbFZhbWNycEdUemRRLDkwNzk3MzM30200S3ASLlAl?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluQ0VJZW91SXR5emkyeVZad2tibTFYTEp4N01TLDkwMDkwMzgx0200XAaTFtcK/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxMjlMYXFQd0ZYR3JYWEZCbFZhbWNycEdUemRRLDkwNzk3MzM30200S3ASLlAl/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -206,7 +206,7 @@
"total_excluding_tax": 1600000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -250,9 +250,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluV3EwbXBrSEQzQ0ZRaHpzakRLVVBnYjBCNHRSLDkwMDkwMzgx0200gB6pch69?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxVE5SbHNpSkxMRERKaVV5M3ZOZ1lQaUpneDR0LDkwNzk3MzM302004S4Tjb5A?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluV3EwbXBrSEQzQ0ZRaHpzakRLVVBnYjBCNHRSLDkwMDkwMzgx0200gB6pch69/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxVE5SbHNpSkxMRERKaVV5M3ZOZ1lQaUpneDR0LDkwNzk3MzM302004S4Tjb5A/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.2.json
index c6387d5fe01..bd683cc6105 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlvSHRkQzd3S2w1cmxvRmptMEtXTm1pMTJuNENiLDkwMDkwMzg10200prtGjhjN?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxTjFHNmRON0FyTFBVQXhHNHplTUhNZHpoRkRwLDkwNzk3MzM502009cCvVkVS?s=ap",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVlvSHRkQzd3S2w1cmxvRmptMEtXTm1pMTJuNENiLDkwMDkwMzg10200prtGjhjN/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxTjFHNmRON0FyTFBVQXhHNHplTUhNZHpoRkRwLDkwNzk3MzM502009cCvVkVS/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluQ0VJZW91SXR5emkyeVZad2tibTFYTEp4N01TLDkwMDkwMzg10200hphaYjkh?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxMjlMYXFQd0ZYR3JYWEZCbFZhbWNycEdUemRRLDkwNzk3MzM50200sjE7PRIJ?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluQ0VJZW91SXR5emkyeVZad2tibTFYTEp4N01TLDkwMDkwMzg10200hphaYjkh/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxMjlMYXFQd0ZYR3JYWEZCbFZhbWNycEdUemRRLDkwNzk3MzM50200sjE7PRIJ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -408,9 +408,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluV3EwbXBrSEQzQ0ZRaHpzakRLVVBnYjBCNHRSLDkwMDkwMzg10200ywj4DLph?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxVE5SbHNpSkxMRERKaVV5M3ZOZ1lQaUpneDR0LDkwNzk3MzM50200ValioOeu?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9PeVluV3EwbXBrSEQzQ0ZRaHpzakRLVVBnYjBCNHRSLDkwMDkwMzg10200ywj4DLph/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED02a3dERVFhcm9xRGpzLF9QMWNxVE5SbHNpSkxMRERKaVV5M3ZOZ1lQaUpneDR0LDkwNzk3MzM50200ValioOeu/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.list.1.json
index d2aa8d5e9d9..82c7ec03c67 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.list.1.json
@@ -7,7 +7,7 @@
"application": null,
"application_fee": null,
"application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
+ "balance_transaction": "txn_3ODaZQDEQaroqDjs09NyLwix",
"billing_details": {
"address": {
"city": null,
@@ -23,9 +23,9 @@
},
"calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
"captured": true,
- "created": 1010000001,
+ "created": 1700260288,
"currency": "usd",
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
"destination": null,
"dispute": null,
@@ -34,7 +34,7 @@
"failure_code": null,
"failure_message": null,
"fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
+ "id": "ch_3ODaZQDEQaroqDjs0sPAH1SG",
"invoice": null,
"livemode": false,
"metadata": {
@@ -43,7 +43,7 @@
"license_management": "automatic",
"licenses": "6",
"price_per_license": "8000",
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
@@ -57,13 +57,13 @@
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
- "risk_score": 0,
+ "risk_score": 56,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
+ "payment_intent": "pi_3ODaZQDEQaroqDjs0PP6Agqe",
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -79,7 +79,7 @@
"extended_authorization": {
"status": "disabled"
},
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "9XKsMixKBi6kIIzd",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
@@ -105,14 +105,14 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKKGjtKoGMgaXv6MX6j86LBYzcI0gA30952KmmPGhELW4l_8OZMRoJnLjwpNfMsUJFLaFZRb8cZyujASC",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMXT36oGMgaWsQERPxI6LBbUTzukeCPRkxo_oNdMDmpjqBFbnMF68YGA0mRGxFcmJ9lwodROkIt9zsnF",
"refunded": false,
"refunds": {
"data": [],
"has_more": false,
"object": "list",
"total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ "url": "/v1/charges/ch_3ODaZQDEQaroqDjs0sPAH1SG/refunds"
},
"review": null,
"shipping": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.create.1.json
index 58419ce2b68..eeda7c3359e 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.create.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1010000002,
+ "created": 1700260281,
"currency": null,
"default_currency": null,
"default_source": null,
@@ -9,8 +9,8 @@
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
@@ -19,7 +19,7 @@
},
"livemode": false,
"metadata": {
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip"
},
"name": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.modify.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.modify.1.json
index 1c5641dd566..73ee53fcb92 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.modify.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1010000002,
+ "created": 1700260281,
"currency": null,
"default_currency": null,
"default_source": null,
@@ -9,17 +9,17 @@
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
+ "default_payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip"
},
"name": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.1.json
index 4108f6493a2..eeda7c3359e 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.1.json
@@ -1,75 +1,29 @@
{
"address": null,
"balance": 0,
- "created": 1010000002,
- "currency": "usd",
- "default_currency": "usd",
+ "created": 1700260281,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
+ "default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.2.json
index 4108f6493a2..abb1939a79e 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.2.json
@@ -1,16 +1,16 @@
{
"address": null,
"balance": 0,
- "created": 1010000002,
- "currency": "usd",
- "default_currency": "usd",
+ "created": 1700260281,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": {
@@ -37,7 +37,7 @@
"country": "US",
"exp_month": 11,
"exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
+ "fingerprint": "9XKsMixKBi6kIIzd",
"funding": "credit",
"generated_from": null,
"last4": "4242",
@@ -52,9 +52,9 @@
},
"wallet": null
},
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "id": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"livemode": false,
"metadata": {},
"object": "payment_method",
@@ -65,11 +65,11 @@
},
"livemode": false,
"metadata": {
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 2,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.3.json
new file mode 100644
index 00000000000..abb1939a79e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1700260281,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "id": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "2",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.4.json
new file mode 100644
index 00000000000..abb1939a79e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1700260281,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "id": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "2",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.5.json
new file mode 100644
index 00000000000..abb1939a79e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1700260281,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "id": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "2",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.6.json
new file mode 100644
index 00000000000..a2ac8bd3018
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1700260281,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "id": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "2",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 2,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.1.json
index 6cb4be5e740..32b216808f5 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.1.json
@@ -2,32 +2,32 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1010000004,
+ "created": 1700260045,
"data": {
"object": {
"account_country": "US",
"account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
- "amount_due": 960000,
- "amount_paid": 0,
- "amount_remaining": 960000,
+ "amount_due": 120000,
+ "amount_paid": 120000,
+ "amount_remaining": 0,
"amount_shipping": 0,
"application": null,
"application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
+ "attempt_count": 1,
+ "attempted": true,
+ "auto_advance": false,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_reason": "manual",
- "charge": null,
- "collection_method": "send_invoice",
- "created": 1010000005,
+ "charge": "ch_3ODZZKDEQaroqDjs12Q2iaOi",
+ "collection_method": "charge_automatically",
+ "created": 1700256437,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0002",
+ "customer": "cus_P1cox2VffiORvk",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -41,49 +41,49 @@
"description": null,
"discount": null,
"discounts": [],
- "due_date": 1000000000,
- "effective_at": 1000000000,
+ "due_date": null,
+ "effective_at": 1700256438,
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvSHRkQzd3S2w1cmxvRmptMEtXTm1pMTJuNENiLDkwMDkwMzg00200Kj4l6m50?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvSHRkQzd3S2w1cmxvRmptMEtXTm1pMTJuNENiLDkwMDkwMzg00200Kj4l6m50/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwODAwODQ10200QNKbnE5B?s=ap",
+ "id": "in_1ODZZJDEQaroqDjsfHgxHyPp",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWNveGhadzc4RHZzVnAyQXU5NUVGeUZiNVJwRlh0LDkwODAwODQ10200QNKbnE5B/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
"data": [
{
- "amount": 960000,
- "amount_excluding_tax": 960000,
+ "amount": 120000,
+ "amount_excluding_tax": 120000,
"currency": "usd",
"description": "Zulip Cloud Standard - renewal",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
+ "id": "il_1ODZZJDEQaroqDjs7WdrOqVk",
+ "invoice_item": "ii_1ODZZJDEQaroqDjsOtjSf76m",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1420167845,
- "start": 1388631845
+ "end": 1362193445,
+ "start": 1330657445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1699463494,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_1OAFHuDEQaroqDjshvGhI6pA",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_OyBTVqZSCbtYS4",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -96,7 +96,7 @@
"proration_details": {
"credited_items": null
},
- "quantity": 120,
+ "quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
@@ -107,24 +107,24 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "url": "/v1/invoices/in_1ODZZJDEQaroqDjsfHgxHyPp/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "4399AF2C-0001",
"object": "invoice",
"on_behalf_of": null,
- "paid": false,
+ "paid": true,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_intent": "pi_3ODZZKDEQaroqDjs1rNokdk7",
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
- "period_end": 1000000000,
- "period_start": 1000000000,
+ "period_end": 1700256437,
+ "period_start": 1700256437,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
@@ -140,38 +140,38 @@
"shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
+ "status": "paid",
"status_transitions": {
- "finalized_at": 1000000000,
+ "finalized_at": 1700256438,
"marked_uncollectible_at": null,
- "paid_at": null,
+ "paid_at": 1700260043,
"voided_at": null
},
"subscription": null,
"subscription_details": {
"metadata": null
},
- "subtotal": 960000,
- "subtotal_excluding_tax": 960000,
+ "subtotal": 120000,
+ "subtotal_excluding_tax": 120000,
"tax": null,
"test_clock": null,
- "total": 960000,
+ "total": 120000,
"total_discount_amounts": [],
- "total_excluding_tax": 960000,
+ "total_excluding_tax": 120000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": 1700256438
}
},
- "id": "evt_1OAbgSDEQaroqDjsPcPrTOid",
+ "id": "evt_1ODaVVDEQaroqDjsH821nzxz",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0001",
- "idempotency_key": "6d8ec9ea-b3af-41aa-9b55-6f1afd8fed78"
+ "id": null,
+ "idempotency_key": null
},
- "type": "invoice.finalized"
+ "type": "invoice.payment_succeeded"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.2.json
index 4437a08b483..1068a32d5fd 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.2.json
@@ -2,224 +2,12 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1010000001,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1010000001,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJujtKoGMgaegZu2BM86LBY9Lg_xODMM_J9pXjGms0bUdhAwAXmUkUl8mhad3GbU1zbb0S12BdcEymyk",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_YGSEoqMQNxfra0g73n7nMb6iU",
- "confirmation_method": "automatic",
- "created": 1010000007,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbgWDEQaroqDjs03P7yyjV",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "2350df8b-cd45-4790-b207-44948361bec0"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000008,
+ "created": 1700260286,
"data": {
"object": {
"address": null,
"balance": 0,
- "created": 1010000002,
+ "created": 1700260281,
"currency": null,
"default_currency": null,
"default_source": null,
@@ -227,17 +15,17 @@
"description": "zulip (Zulip Dev)",
"discount": null,
"email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
+ "default_payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip"
},
"name": null,
@@ -255,362 +43,18 @@
}
}
},
- "id": "evt_1OAbgaDEQaroqDjsOhanqfpI",
+ "id": "evt_1ODaZODEQaroqDjsb4z7FEPA",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "562792b1-6d24-4337-8b64-612cf6ca0681"
+ "id": "req_1zwwy99qmt4q93",
+ "idempotency_key": "b8c4b84d-4d6d-40d1-b178-1f96f1a64938"
},
"type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000003,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbgYDEQaroqDjsGYbe6yR5_secret_OyYoURC00xdRsYzhtrqCYM0sDvvjVoh",
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbgYDEQaroqDjsGYbe6yR5",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbgYDEQaroqDjsZcovkNJq",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbgZDEQaroqDjsAe0kZJES",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2606ac5d-8418-47d8-869c-9d4d45e9fd58"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000003,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbgYDEQaroqDjsfARyIjuh",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2606ac5d-8418-47d8-869c-9d4d45e9fd58"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000003,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbgYDEQaroqDjsGYbe6yR5_secret_OyYoURC00xdRsYzhtrqCYM0sDvvjVoh",
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbgYDEQaroqDjsGYbe6yR5",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbgYDEQaroqDjsZcovkNJq",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbgZDEQaroqDjsDUAOxnCE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2606ac5d-8418-47d8-869c-9d4d45e9fd58"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000009,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbgXDEQaroqDjsAw73Xufz_secret_OyYociDw8INjoJelAG6pILaxlsDSZTJ",
- "created": 1010000009,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbgXDEQaroqDjsAw73Xufz",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbgXDEQaroqDjsruUE9MO8",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "b197e6f1-dc43-469f-8c12-5c6e959a2a6c"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000007,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_YGSEoqMQNxfra0g73n7nMb6iU",
- "confirmation_method": "automatic",
- "created": 1010000007,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbgWDEQaroqDjs0TmyNL1w",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "e4dc86ee-88bd-489f-a55c-7fd7e3c9edcd"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000002,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbgVDEQaroqDjsGDbq4MQ4",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "d5fd6dfd-14ce-4977-8db2-067d03b9774a"
- },
- "type": "customer.created"
}
],
- "has_more": false,
+ "has_more": true,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.3.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.3.json
index 8cc6389a791..41649fec5b9 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.3.json
@@ -2,1315 +2,354 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1010000010,
+ "created": 1700260288,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
+ "amount": 48000,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000011,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk50200LgmSHOV3?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk50200LgmSHOV3/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "automatic",
+ "charges": {
"data": [
{
"amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000012,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_3ODaZQDEQaroqDjs09NyLwix",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
},
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1700260288,
"currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "customer": "cus_P1drIpeDVBfuR5",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_3ODaZQDEQaroqDjs0sPAH1SG",
+ "invoice": null,
"livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "2",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
},
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000013,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 56,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "proration": false,
- "proration_details": {
- "credited_items": null
+ "paid": true,
+ "payment_intent": "pi_3ODaZQDEQaroqDjs0PP6Agqe",
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
},
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMHT36oGMgbLfwcI7aw6LBbO8kcZn5YrBReU49FwgyPKKTd6LukaYuRANE56q9JN97LIYZPgQ-lgXBOs",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_3ODaZQDEQaroqDjs0sPAH1SG/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
}
],
"has_more": false,
"object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_3ODaZQDEQaroqDjs0PP6Agqe"
},
+ "client_secret": "pi_3ODaZQDEQaroqDjs0PP6Agqe_secret_yvIvKKrHX4Df1JcJAm7HGIJoh",
+ "confirmation_method": "automatic",
+ "created": 1700260288,
+ "currency": "usd",
+ "customer": "cus_P1drIpeDVBfuR5",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "id": "pi_3ODaZQDEQaroqDjs0PP6Agqe",
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3ODaZQDEQaroqDjs0sPAH1SG",
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "2",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "next_action": null,
+ "object": "payment_intent",
"on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
}
},
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": "[email protected]",
+ "review": null,
+ "setup_future_usage": null,
+ "shipping": null,
+ "source": null,
"statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "transfer_group": null
}
},
- "id": "evt_1OAbghDEQaroqDjs1d76rv3C",
+ "id": "evt_3ODaZQDEQaroqDjs0qg0C9bT",
"livemode": false,
"object": "event",
"pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "bd1edecf-afd5-4e26-b00d-f97be1845ce6"
+ "id": "req_j3UdyTMdXpi8w3",
+ "idempotency_key": "31636d8f-f98e-45c1-b2e6-af24e70e9a38"
},
- "type": "invoice.payment_succeeded"
+ "type": "payment_intent.succeeded"
},
{
"api_version": "2020-08-27",
- "created": 1010000010,
+ "created": 1700260288,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
"application": null,
+ "application_fee": null,
"application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000011,
+ "balance_transaction": "txn_3ODaZQDEQaroqDjs09NyLwix",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1700260288,
"currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk50200LgmSHOV3?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk50200LgmSHOV3/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000012,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000013,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
+ "customer": "cus_P1drIpeDVBfuR5",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_3ODaZQDEQaroqDjs0sPAH1SG",
+ "invoice": null,
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "2",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
"on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbghDEQaroqDjsvTiuC6Ij",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "bd1edecf-afd5-4e26-b00d-f97be1845ce6"
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000010,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 56,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000011,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk40200FBPqXgOV?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk40200FBPqXgOV/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000012,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000013,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
"paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbggDEQaroqDjsLQapn5L1",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "bd1edecf-afd5-4e26-b00d-f97be1845ce6"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000010,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000011,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk40200FBPqXgOV?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk40200FBPqXgOV/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000012,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
+ "payment_intent": "pi_3ODaZQDEQaroqDjs0PP6Agqe",
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
},
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000013,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
},
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
+ "receipt_email": "[email protected]",
"receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "attempted": false,
- "auto_advance": true,
- "effective_at": null,
- "ending_balance": null,
- "hosted_invoice_url": null,
- "invoice_pdf": null,
- "next_payment_attempt": 1000000000,
- "number": null,
- "paid": false,
- "rendering": {
- "pdf": {
- "page_size": "auto"
- }
- },
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "paid_at": null
- }
- }
- },
- "id": "evt_1OAbggDEQaroqDjsAHAxuhuk",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "bd1edecf-afd5-4e26-b00d-f97be1845ce6"
- },
- "type": "invoice.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000011,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000011,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": null,
- "ending_balance": null,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000012,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000013,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMHT36oGMganofZ_B-86LBazbOvnZUMUYSPQ8lT4JbE7XmmqbjcE3Foh2-_HLpR3kM_R-ukTAXw7MWAu",
+ "refunded": false,
+ "refunds": {
+ "data": [],
"has_more": false,
"object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": null,
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "auto"
- }
+ "total_count": 0,
+ "url": "/v1/charges/ch_3ODaZQDEQaroqDjs0sPAH1SG/refunds"
},
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
"statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
"transfer_data": null,
- "webhooks_delivered_at": null
- }
- },
- "id": "evt_1OAbgfDEQaroqDjsY40u7wXz",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "e6bdbf41-e345-49a6-b978-676ce79544fa"
- },
- "type": "invoice.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000014,
- "data": {
- "object": {
- "amount": 48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000012,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- }
- },
- "id": "evt_1OAbgeDEQaroqDjsWaK3lXSL",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "32880464-7e10-4b8c-b99b-389d56838de0"
- },
- "type": "invoiceitem.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000015,
- "data": {
- "object": {
- "amount": -48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000013,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0003",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- }
- },
- "id": "evt_1OAbgdDEQaroqDjsL4X7RcPC",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "b18112c4-28aa-4758-9003-9f6237b36cf2"
- },
- "type": "invoiceitem.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000015,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000002,
- "currency": "usd",
- "default_currency": "usd",
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "currency": null,
- "default_currency": null
+ "transfer_group": null
}
},
- "id": "evt_1OAbgdDEQaroqDjs0QdfcPu3",
+ "id": "evt_3ODaZQDEQaroqDjs0bvFKgxF",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "b18112c4-28aa-4758-9003-9f6237b36cf2"
+ "id": "req_j3UdyTMdXpi8w3",
+ "idempotency_key": "31636d8f-f98e-45c1-b2e6-af24e70e9a38"
},
- "type": "customer.updated"
+ "type": "charge.succeeded"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.4.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.4.json
index 6d922067afe..5cc887ad9e5 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.4.json
@@ -1,5 +1,649 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260291,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1700260290,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1700260291,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDkx0200U0NAZrYt?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDkx0200U0NAZrYt/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1698927319,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3rmiwsD4vFL",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1700260289,
+ "start": 1700260289
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1699463487,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3hKgN66WIeP",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "E0739F8A-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1700260290,
+ "period_start": 1700260290,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1700260291,
+ "marked_uncollectible_at": null,
+ "paid_at": 1700260291,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ },
+ "previous_attributes": {
+ "attempted": false,
+ "auto_advance": true,
+ "effective_at": null,
+ "ending_balance": null,
+ "hosted_invoice_url": null,
+ "invoice_pdf": null,
+ "next_payment_attempt": 1700263890,
+ "number": null,
+ "paid": false,
+ "rendering": {
+ "pdf": {
+ "page_size": "auto"
+ }
+ },
+ "status": "draft",
+ "status_transitions": {
+ "finalized_at": null,
+ "paid_at": null
+ }
+ }
+ },
+ "id": "evt_1ODaZUDEQaroqDjs5f9Pz6BI",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 2,
+ "request": {
+ "id": "req_0DoD4jECcpDwAX",
+ "idempotency_key": "e342127e-bc3d-4dc2-b58f-fa07034d245c"
+ },
+ "type": "invoice.updated"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260290,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": false,
+ "auto_advance": true,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1700260290,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": null,
+ "ending_balance": null,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": null,
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": null,
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1698927319,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3rmiwsD4vFL",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1700260289,
+ "start": 1700260289
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1699463487,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3hKgN66WIeP",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": 1700263890,
+ "number": null,
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": false,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1700260290,
+ "period_start": 1700260290,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "auto"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "draft",
+ "status_transitions": {
+ "finalized_at": null,
+ "marked_uncollectible_at": null,
+ "paid_at": null,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODaZTDEQaroqDjsUIp1Hu9S",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_AoqqLtgTEVJyNR",
+ "idempotency_key": "96f5191d-6004-43a0-896e-cfc115f14ec8"
+ },
+ "type": "invoice.created"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260290,
+ "data": {
+ "object": {
+ "amount": 48000,
+ "currency": "usd",
+ "customer": "cus_P1drIpeDVBfuR5",
+ "date": 1700260290,
+ "description": "Zulip Cloud Standard",
+ "discountable": false,
+ "discounts": [],
+ "id": "ii_1ODaZSDEQaroqDjsRqO6EssA",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {},
+ "object": "invoiceitem",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1698927319,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3rmiwsD4vFL",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "quantity": 6,
+ "subscription": null,
+ "tax_rates": [],
+ "test_clock": null,
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ }
+ },
+ "id": "evt_1ODaZSDEQaroqDjsprUwxOk8",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_iPHG8KebzAo871",
+ "idempotency_key": "1824fc57-3e52-44d8-89e7-4a9459c613bd"
+ },
+ "type": "invoiceitem.created"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260289,
+ "data": {
+ "object": {
+ "amount": -48000,
+ "currency": "usd",
+ "customer": "cus_P1drIpeDVBfuR5",
+ "date": 1700260289,
+ "description": "Payment (Card ending in 4242)",
+ "discountable": false,
+ "discounts": [],
+ "id": "ii_1ODaZRDEQaroqDjsT8L2MVut",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {},
+ "object": "invoiceitem",
+ "period": {
+ "end": 1700260289,
+ "start": 1700260289
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1699463487,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3hKgN66WIeP",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "quantity": 1,
+ "subscription": null,
+ "tax_rates": [],
+ "test_clock": null,
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ }
+ },
+ "id": "evt_1ODaZRDEQaroqDjsKaQ8N9ki",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_sObTWslx5q33KG",
+ "idempotency_key": "6fa706d2-a44c-448d-a22c-c36b94d1e9c7"
+ },
+ "type": "invoiceitem.created"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260289,
+ "data": {
+ "object": {
+ "address": null,
+ "balance": 0,
+ "created": 1700260281,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_P1drIpeDVBfuR5",
+ "invoice_prefix": "E0739F8A",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "2",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "currency": null,
+ "default_currency": null
+ }
+ },
+ "id": "evt_1ODaZRDEQaroqDjscM2WD17O",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_sObTWslx5q33KG",
+ "idempotency_key": "6fa706d2-a44c-448d-a22c-c36b94d1e9c7"
+ },
+ "type": "customer.updated"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.5.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.5.json
new file mode 100644
index 00000000000..ded973e1476
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.5.json
@@ -0,0 +1,453 @@
+{
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260291,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1700260290,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1700260291,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1698927319,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3rmiwsD4vFL",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1700260289,
+ "start": 1700260289
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1699463487,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3hKgN66WIeP",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "E0739F8A-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1700260290,
+ "period_start": 1700260290,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1700260291,
+ "marked_uncollectible_at": null,
+ "paid_at": 1700260291,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODaZUDEQaroqDjs8XdDwbHs",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 2,
+ "request": {
+ "id": "req_0DoD4jECcpDwAX",
+ "idempotency_key": "e342127e-bc3d-4dc2-b58f-fa07034d245c"
+ },
+ "type": "invoice.paid"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1700260291,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1700260290,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1700260291,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1698927319,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3rmiwsD4vFL",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1700260289,
+ "start": 1700260289
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1699463487,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3hKgN66WIeP",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "E0739F8A-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1700260290,
+ "period_start": 1700260290,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1700260291,
+ "marked_uncollectible_at": null,
+ "paid_at": 1700260291,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODaZUDEQaroqDjseEn37pd2",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_0DoD4jECcpDwAX",
+ "idempotency_key": "e342127e-bc3d-4dc2-b58f-fa07034d245c"
+ },
+ "type": "invoice.finalized"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.8.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.6.json
similarity index 75%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.8.json
rename to corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.6.json
index 59b81511ead..6bab819dba0 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.8.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.6.json
@@ -2,7 +2,7 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1700260291,
"data": {
"object": {
"account_country": "US",
@@ -24,10 +24,10 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1000000000,
+ "created": 1700260290,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -42,48 +42,48 @@
"discount": null,
"discounts": [],
"due_date": null,
- "effective_at": 1000000000,
+ "effective_at": 1700260291,
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUz0200cmDP6dkE?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUz0200cmDP6dkE/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
"data": [
{
- "amount": 184000,
- "amount_excluding_tax": 184000,
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1000000000,
+ "created": 1698927319,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_OvY3rmiwsD4vFL",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -96,7 +96,7 @@
"proration_details": {
"credited_items": null
},
- "quantity": 23,
+ "quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
@@ -104,43 +104,43 @@
"unit_amount_excluding_tax": "8000"
},
{
- "amount": -184000,
- "amount_excluding_tax": -184000,
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1700260289,
+ "start": 1700260289
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1000000000,
+ "created": 1699463487,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_OvY3hKgN66WIeP",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
},
"proration": false,
"proration_details": {
@@ -151,18 +151,18 @@
"tax_amounts": [],
"tax_rates": [],
"type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "E0739F8A-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -173,8 +173,8 @@
"payment_method_options": null,
"payment_method_types": null
},
- "period_end": 1000000000,
- "period_start": 1000000000,
+ "period_end": 1700260290,
+ "period_start": 1700260290,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
@@ -192,9 +192,9 @@
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
"status_transitions": {
- "finalized_at": 1000000000,
+ "finalized_at": 1700260291,
"marked_uncollectible_at": null,
- "paid_at": 1000000000,
+ "paid_at": 1700260291,
"voided_at": null
},
"subscription": null,
@@ -210,16 +210,16 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbhZDEQaroqDjsMKojdzkZ",
+ "id": "evt_1ODaZUDEQaroqDjsQUzPKPVq",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0016",
- "idempotency_key": "325b4bd2-369b-411c-bc0d-6b262684015b"
+ "id": "req_0DoD4jECcpDwAX",
+ "idempotency_key": "e342127e-bc3d-4dc2-b58f-fa07034d245c"
},
"type": "invoice.payment_succeeded"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.7.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.7.json
new file mode 100644
index 00000000000..6d922067afe
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.7.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.8.json
similarity index 54%
rename from corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.1.json
rename to corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.8.json
index 429487802c8..fc6ffcf358f 100644
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Event.list.8.json
@@ -2,32 +2,32 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1000000000,
+ "created": 1700260291,
"data": {
"object": {
"account_country": "US",
"account_name": "Kandra Labs, Inc.",
"account_tax_ids": null,
- "amount_due": 984000,
+ "amount_due": 0,
"amount_paid": 0,
- "amount_remaining": 984000,
+ "amount_remaining": 0,
"amount_shipping": 0,
"application": null,
"application_fee_amount": null,
"attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
+ "attempted": true,
+ "auto_advance": false,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_reason": "manual",
"charge": null,
- "collection_method": "send_invoice",
- "created": 1000000000,
+ "collection_method": "charge_automatically",
+ "created": 1700260290,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0002",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -41,28 +41,28 @@
"description": null,
"discount": null,
"discounts": [],
- "due_date": 1000000000,
- "effective_at": 1000000000,
+ "due_date": null,
+ "effective_at": 1700260291,
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvNXdrNDVxV2hzODM3QkJaeTZPRWRhdU8wYTR5LDkwMDkwNDI402008mXSGJFs?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvNXdrNDVxV2hzODM3QkJaeTZPRWRhdU8wYTR5LDkwMDkwNDI402008mXSGJFs/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDky0200FRmkA8SI/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
"data": [
{
- "amount": 984000,
- "amount_excluding_tax": 984000,
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
"description": "Zulip Cloud Standard",
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -74,16 +74,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1000000000,
+ "created": 1698927319,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0001",
+ "product": "prod_OvY3rmiwsD4vFL",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -96,35 +96,85 @@
"proration_details": {
"credited_items": null
},
- "quantity": 123,
+ "quantity": 6,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
"type": "invoiceitem",
"unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1700260289,
+ "start": 1700260289
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1699463487,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_OvY3hKgN66WIeP",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
- "total_count": 1,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "total_count": 2,
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "E0739F8A-0001",
"object": "invoice",
"on_behalf_of": null,
- "paid": false,
+ "paid": true,
"paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000003",
+ "payment_intent": null,
"payment_settings": {
"default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
- "period_end": 1000000000,
- "period_start": 1000000000,
+ "period_end": 1700260290,
+ "period_start": 1700260290,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
@@ -140,38 +190,38 @@
"shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
+ "status": "paid",
"status_transitions": {
- "finalized_at": 1000000000,
+ "finalized_at": 1700260291,
"marked_uncollectible_at": null,
- "paid_at": null,
+ "paid_at": 1700260291,
"voided_at": null
},
"subscription": null,
"subscription_details": {
"metadata": null
},
- "subtotal": 984000,
- "subtotal_excluding_tax": 984000,
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
"tax": null,
"test_clock": null,
- "total": 984000,
+ "total": 0,
"total_discount_amounts": [],
- "total_excluding_tax": 984000,
+ "total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbhADEQaroqDjsnvWUWkKu",
+ "id": "evt_1ODaZUDEQaroqDjsQUzPKPVq",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0001",
- "idempotency_key": "6e08dbcd-df1a-4a1b-8e45-b4e91e68dc42"
+ "id": "req_0DoD4jECcpDwAX",
+ "idempotency_key": "e342127e-bc3d-4dc2-b58f-fa07034d245c"
},
- "type": "invoice.finalized"
+ "type": "invoice.payment_succeeded"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.create.1.json
index 87a07fbad2b..5da09df62b9 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.create.1.json
@@ -18,10 +18,10 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000011,
+ "created": 1700260290,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -68,16 +68,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000012,
+ "created": 1698927319,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_OvY3rmiwsD4vFL",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,29 +105,29 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1700260289,
+ "start": 1700260289
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000013,
+ "created": 1699463487,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_OvY3hKgN66WIeP",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,11 +151,11 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
},
"livemode": false,
"metadata": {},
- "next_payment_attempt": 1000000000,
+ "next_payment_attempt": 1700263890,
"number": null,
"object": "invoice",
"on_behalf_of": null,
@@ -167,8 +167,8 @@
"payment_method_options": null,
"payment_method_types": null
},
- "period_end": 1000000000,
- "period_start": 1000000000,
+ "period_end": 1700260290,
+ "period_start": 1700260290,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.finalize_invoice.1.json
index 521c1f3f6bd..b5ce54f84ce 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.finalize_invoice.1.json
@@ -18,10 +18,10 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000011,
+ "created": 1700260290,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -36,13 +36,13 @@
"discount": null,
"discounts": [],
"due_date": null,
- "effective_at": 1000000000,
+ "effective_at": 1700260291,
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk40200FBPqXgOV?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk40200FBPqXgOV/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDkx0200U0NAZrYt?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDkx0200U0NAZrYt/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,8 +55,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -68,16 +68,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000012,
+ "created": 1698927319,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_OvY3rmiwsD4vFL",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -105,29 +105,29 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1700260289,
+ "start": 1700260289
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000013,
+ "created": 1699463487,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_OvY3hKgN66WIeP",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -151,12 +151,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "E0739F8A-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -167,8 +167,8 @@
"payment_method_options": null,
"payment_method_types": null
},
- "period_end": 1000000000,
- "period_start": 1000000000,
+ "period_end": 1700260290,
+ "period_start": 1700260290,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
@@ -186,9 +186,9 @@
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
"status_transitions": {
- "finalized_at": 1000000000,
+ "finalized_at": 1700260291,
"marked_uncollectible_at": null,
- "paid_at": 1000000000,
+ "paid_at": 1700260291,
"voided_at": null
},
"subscription": null,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.2.json
index 171371ed180..7099e78fab9 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.2.json
@@ -20,10 +20,10 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000011,
+ "created": 1700260290,
"currency": "usd",
"custom_fields": null,
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_address": null,
"customer_email": "[email protected]",
"customer_name": null,
@@ -38,13 +38,13 @@
"discount": null,
"discounts": [],
"due_date": null,
- "effective_at": 1000000000,
+ "effective_at": 1700260291,
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwNDAy0200runOXQae?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwNDAy0200runOXQae/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDkz0200dgtMezl7?s=ap",
+ "id": "in_1ODaZSDEQaroqDjsAIQjRmQ3",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_17vTkwDEQaroqDjs/test_YWNjdF8xN3ZUa3dERVFhcm9xRGpzLF9QMWRyVE1YUWJqMzJNc0k5dm1QRThRVGFCYXh1ZW9zLDkwODAxMDkz0200dgtMezl7/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -57,8 +57,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "id": "il_1ODaZSDEQaroqDjsSIdbCJ8C",
+ "invoice_item": "ii_1ODaZSDEQaroqDjsRqO6EssA",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -70,16 +70,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000012,
+ "created": 1698927319,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_OvY3rmiwsD4vFL",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -107,29 +107,29 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_1ODaZSDEQaroqDjsFv3jRpf4",
+ "invoice_item": "ii_1ODaZRDEQaroqDjsT8L2MVut",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1700260289,
+ "start": 1700260289
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000013,
+ "created": 1699463487,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_OvY3hKgN66WIeP",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
@@ -153,12 +153,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_1ODaZSDEQaroqDjsAIQjRmQ3/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": "E0739F8A-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -169,8 +169,8 @@
"payment_method_options": null,
"payment_method_types": null
},
- "period_end": 1000000000,
- "period_start": 1000000000,
+ "period_end": 1700260290,
+ "period_start": 1700260290,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
@@ -188,9 +188,9 @@
"statement_descriptor": "Zulip Cloud Standard",
"status": "paid",
"status_transitions": {
- "finalized_at": 1000000000,
+ "finalized_at": 1700260291,
"marked_uncollectible_at": null,
- "paid_at": 1000000000,
+ "paid_at": 1700260291,
"voided_at": null
},
"subscription": null,
@@ -206,7 +206,7 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": 1700260291
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.1.json
index b63e8bc8c53..d318c439b25 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.1.json
@@ -1,34 +1,34 @@
{
"amount": -48000,
"currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "date": 1700260289,
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_1ODaZRDEQaroqDjsT8L2MVut",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1700260289,
+ "start": 1700260289
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000013,
+ "created": 1699463487,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
+ "id": "price_1OAFHnDEQaroqDjsGPnkI1Z2",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0003",
+ "product": "prod_OvY3hKgN66WIeP",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.2.json
index 0be0cf04735..3520269a0f1 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--InvoiceItem.create.2.json
@@ -1,12 +1,12 @@
{
"amount": 48000,
"currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
+ "customer": "cus_P1drIpeDVBfuR5",
+ "date": 1700260290,
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "ii_1ODaZSDEQaroqDjsRqO6EssA",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -19,16 +19,16 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000012,
+ "created": 1698927319,
"currency": "usd",
"custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
+ "id": "price_1O7znvDEQaroqDjsLJjqNJy0",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_NORMALIZED0002",
+ "product": "prod_OvY3rmiwsD4vFL",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.confirm.1.json
deleted file mode 100644
index c2b10b810ee..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1010000001,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJqjtKoGMgZ5ak3jmUc6LBZTDQHMU-PaJXJB-piwU7KfoH0JKnQ7XH6uARWhVzJVko8EMvc-puqFbT5I",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_YGSEoqMQNxfra0g73n7nMb6iU",
- "confirmation_method": "automatic",
- "created": 1010000007,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.create.1.json
index b535abb4c3a..7c0c415a780 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_3ODaZQDEQaroqDjs09NyLwix",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1700260288,
+ "currency": "usd",
+ "customer": "cus_P1drIpeDVBfuR5",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_3ODaZQDEQaroqDjs0sPAH1SG",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "2",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 56,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_3ODaZQDEQaroqDjs0PP6Agqe",
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "9XKsMixKBi6kIIzd",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKMHT36oGMgamTpsIk9k6LBaAAVG2gWUBwtSg0tby2-iv2PrVuZD_pARUNxjcTiOiLQj9uEDKQUNmBreP",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_3ODaZQDEQaroqDjs0sPAH1SG/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_3ODaZQDEQaroqDjs0PP6Agqe"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_YGSEoqMQNxfra0g73n7nMb6iU",
+ "client_secret": "pi_3ODaZQDEQaroqDjs0PP6Agqe_secret_yvIvKKrHX4Df1JcJAm7HGIJoh",
"confirmation_method": "automatic",
- "created": 1010000007,
+ "created": 1700260288,
"currency": "usd",
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
+ "id": "pi_3ODaZQDEQaroqDjs0PP6Agqe",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_3ODaZQDEQaroqDjs0sPAH1SG",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -35,7 +160,7 @@
"license_management": "automatic",
"licenses": "6",
"price_per_license": "8000",
- "realm_id": "1",
+ "realm_id": "2",
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.create.1.json
index aea6fed6ba1..dfed1bdf668 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbgYDEQaroqDjsGYbe6yR5_secret_OyYoURC00xdRsYzhtrqCYM0sDvvjVoh",
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
+ "client_secret": "seti_1ODaZMDEQaroqDjsE818DzIm_secret_P1drsEDvtpcLW1T6OYFPK1EnOJh5XXY",
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbgYDEQaroqDjsGYbe6yR5",
+ "id": "seti_1ODaZMDEQaroqDjsE818DzIm",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbgYDEQaroqDjsZcovkNJq",
+ "latest_attempt": "setatt_1ODaZMDEQaroqDjsv6LAKeCL",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.list.1.json
index c3e4e18ed62..556c67c6f7d 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbgXDEQaroqDjsAw73Xufz_secret_OyYociDw8INjoJelAG6pILaxlsDSZTJ",
- "created": 1010000009,
- "customer": "cus_NORMALIZED0001",
+ "client_secret": "seti_1ODaZLDEQaroqDjs1M3Q8MK8_secret_P1drPIH6JfWYGzmCAkzaefdroy0FvP9",
+ "created": 1700260283,
+ "customer": "cus_P1drIpeDVBfuR5",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbgXDEQaroqDjsAw73Xufz",
+ "id": "seti_1ODaZLDEQaroqDjs1M3Q8MK8",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.retrieve.1.json
index aea6fed6ba1..dfed1bdf668 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbgYDEQaroqDjsGYbe6yR5_secret_OyYoURC00xdRsYzhtrqCYM0sDvvjVoh",
- "created": 1010000003,
- "customer": "cus_NORMALIZED0001",
+ "client_secret": "seti_1ODaZMDEQaroqDjsE818DzIm_secret_P1drsEDvtpcLW1T6OYFPK1EnOJh5XXY",
+ "created": 1700260284,
+ "customer": "cus_P1drIpeDVBfuR5",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbgYDEQaroqDjsGYbe6yR5",
+ "id": "seti_1ODaZMDEQaroqDjsE818DzIm",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbgYDEQaroqDjsZcovkNJq",
+ "latest_attempt": "setatt_1ODaZMDEQaroqDjsv6LAKeCL",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbgYDEQaroqDjsPkuww2Vr",
+ "payment_method": "pm_1ODaZMDEQaroqDjsvpFOJgKh",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.create.1.json
index 511a2f2f98e..4c3621eb2ec 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000009,
+ "created": 1700260283,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -22,7 +22,7 @@
"submit": null,
"terms_of_service_acceptance": null
},
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_creation": null,
"customer_details": {
"address": null,
@@ -33,23 +33,14 @@
"tax_ids": null
},
"customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02aTk6kW0epSHI44FP9ggdAALXBUJ3BlN1GJk9ADcwK2huEd",
+ "expires_at": 1700346683,
+ "id": "cs_test_c186WP3qHmm8bPDCIZP7VFxY5oUmZASuaDiHQ0xpp2IEtSM1MX9zt7IiRY",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbgXDEQaroqDjsAw73Xufz",
+ "setup_intent": "seti_1ODaZLDEQaroqDjs1M3Q8MK8",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02aTk6kW0epSHI44FP9ggdAALXBUJ3BlN1GJk9ADcwK2huEd#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_c186WP3qHmm8bPDCIZP7VFxY5oUmZASuaDiHQ0xpp2IEtSM1MX9zt7IiRY#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.list.1.json
index 712123bc138..7a40abdc753 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000009,
+ "created": 1700260283,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -24,7 +24,7 @@
"submit": null,
"terms_of_service_acceptance": null
},
- "customer": "cus_NORMALIZED0001",
+ "customer": "cus_P1drIpeDVBfuR5",
"customer_creation": null,
"customer_details": {
"address": null,
@@ -35,23 +35,14 @@
"tax_ids": null
},
"customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02aTk6kW0epSHI44FP9ggdAALXBUJ3BlN1GJk9ADcwK2huEd",
+ "expires_at": 1700346683,
+ "id": "cs_test_c186WP3qHmm8bPDCIZP7VFxY5oUmZASuaDiHQ0xpp2IEtSM1MX9zt7IiRY",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbgXDEQaroqDjsAw73Xufz",
+ "setup_intent": "seti_1ODaZLDEQaroqDjs1M3Q8MK8",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02aTk6kW0epSHI44FP9ggdAALXBUJ3BlN1GJk9ADcwK2huEd#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_c186WP3qHmm8bPDCIZP7VFxY5oUmZASuaDiHQ0xpp2IEtSM1MX9zt7IiRY#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.list.1.json
index b50eee24405..76f49882f1c 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.list.1.json
@@ -63,7 +63,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -105,7 +105,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLWjtKoGMgYO72Irfy86LBaq9kYrIEaHLyp4E6m3HZ43P3Hs3LRiFnHfn8BaVXsEutimDL6QI7zKa2R6",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKLK236oGMgb3J2Vbbk46LBY0N16T1r3oIvZRLKPGYSRuYrU6ZvWbwjYhumebVjZRBUAGdglJg3WPVW_X",
"refunded": false,
"refunds": {
"data": [],
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.modify.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.modify.1.json
index 5ea12f27bcc..eeb2281e0df 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "default_payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.1.json
new file mode 100644
index 00000000000..7c9c3c5cf3b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000002,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.2.json
new file mode 100644
index 00000000000..7c9c3c5cf3b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000002,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.3.json
new file mode 100644
index 00000000000..7c9c3c5cf3b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000002,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.4.json
new file mode 100644
index 00000000000..7c9c3c5cf3b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000002,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.1.json
index f512bdf0a13..b713bfcc1e4 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.1.json
@@ -2,226 +2,56 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1010000003,
+ "created": 1010000004,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000004,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0002",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
+ "address": null,
+ "balance": 0,
+ "created": 1010000002,
+ "currency": null,
+ "default_currency": null,
"default_source": null,
- "default_tax_rates": [],
- "description": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
"discount": null,
- "discounts": [],
- "due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk50200LgmSHOV3?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvTnVNZEN0QmhzOXpsdTA0TlBNbFJDUWxvNDVjLDkwMDkwMzk50200LgmSHOV3/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1357095845,
- "start": 1325473445
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000005,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000006,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
+ "footer": null,
+ "rendering_options": null
},
"livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
},
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+ },
+ "previous_attributes": {
+ "invoice_settings": {
+ "default_payment_method": null
+ }
}
},
- "id": "evt_1OAbghDEQaroqDjs1d76rv3C",
+ "id": "evt_1ODZbEDEQaroqDjsG2ZWXSNn",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "bd1edecf-afd5-4e26-b00d-f97be1845ce6"
+ "idempotency_key": "4076266f-f7ce-492c-8f26-e2bc51dbe79d"
},
- "type": "invoice.payment_succeeded"
+ "type": "customer.updated"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.2.json
index fdeb57afa62..74f6e5e8b94 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.2.json
@@ -2,7 +2,7 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1010000007,
+ "created": 1010000005,
"data": {
"object": {
"amount": 48000,
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -124,7 +124,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKK6jtKoGMgbqbRQ9e6I6LBYAstpG6IO1tn9Q_6naGGKatY2566OPuyKVt0kiB4il4Bpp67uTvA1n-ZQN",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKK-236oGMgYUOLyzJMg6LBb-66rvHv6q-8tIC0T8m4OahAt2i5W0b1aF-9sqaq8bjA-0OsU3Eo-HPpT-",
"refunded": false,
"refunds": {
"data": [],
@@ -149,9 +149,9 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_aOaSQAoIvgc832z80q5JaiWbv",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_GhNIQ1qIF31zO8VOgP3Au41k0",
"confirmation_method": "automatic",
- "created": 1010000008,
+ "created": 1010000001,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
@@ -176,7 +176,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -202,19 +202,19 @@
"transfer_group": null
}
},
- "id": "evt_3OAbgoDEQaroqDjs00Clgog7",
+ "id": "evt_3ODZbGDEQaroqDjs1pIcV6qz",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "58ebb816-d60d-4782-856a-20a1a0698deb"
+ "idempotency_key": "6583fd8a-d424-45e2-abba-df18edd580bb"
},
"type": "payment_intent.succeeded"
},
{
"api_version": "2020-08-27",
- "created": 1010000007,
+ "created": 1010000005,
"data": {
"object": {
"amount": 48000,
@@ -279,7 +279,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -321,7 +321,7 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKK6jtKoGMgbN2XKFj306LBbqLD5rf1N3AmwfK_YBV9qLcXvKTp1GlKddlE0rSIdZO8j0txa2fj0Wp7E2",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKK-236oGMgbj7n5hrMk6LBYCyZ-XEO3uuxGJv9jcZtkezwOe27kp2l_jhD_8Bp2OWgzcyntEdwyTSi6b",
"refunded": false,
"refunds": {
"data": [],
@@ -341,412 +341,15 @@
"transfer_group": null
}
},
- "id": "evt_3OAbgoDEQaroqDjs0unGmRV3",
+ "id": "evt_3ODZbGDEQaroqDjs1B0UnbeU",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0002",
- "idempotency_key": "58ebb816-d60d-4782-856a-20a1a0698deb"
+ "idempotency_key": "6583fd8a-d424-45e2-abba-df18edd580bb"
},
"type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000009,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000002,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbgtDEQaroqDjscNlouTO6",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "9fdd2752-1da7-4f40-b9e5-67b0a055acbd"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000010,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbgqDEQaroqDjs3x014Xoe_secret_OyYopbWAJ8G6nkYyH328hn5Wa8L3DXN",
- "created": 1010000011,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbgqDEQaroqDjs3x014Xoe",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbgqDEQaroqDjs9SWEkZaq",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbgrDEQaroqDjsR31Oq9He",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "e612bbb9-d6bd-4c9b-b9c9-ee1b02ab03d6"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000010,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1010000011,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbgqDEQaroqDjsERlLYz74",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbgrDEQaroqDjsOzmfkHPU",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "e612bbb9-d6bd-4c9b-b9c9-ee1b02ab03d6"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000011,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbgqDEQaroqDjs3x014Xoe_secret_OyYopbWAJ8G6nkYyH328hn5Wa8L3DXN",
- "created": 1010000011,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbgqDEQaroqDjs3x014Xoe",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbgqDEQaroqDjs9SWEkZaq",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbgrDEQaroqDjsY4T711mI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "e612bbb9-d6bd-4c9b-b9c9-ee1b02ab03d6"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000012,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbgpDEQaroqDjsR2qIpKlA_secret_OyYo6wJ52hSYocCr9bxCDmSQa6rejz3",
- "created": 1010000012,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbgpDEQaroqDjsR2qIpKlA",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbgpDEQaroqDjsD3pt5m38",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "597c357d-05b1-4291-9db9-2c0a579ef4f9"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000008,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_aOaSQAoIvgc832z80q5JaiWbv",
- "confirmation_method": "automatic",
- "created": 1010000008,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbgoDEQaroqDjs06S5mtHL",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "e31dd3f3-3ae5-4159-ae4b-af9e87fda052"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000002,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1010000002,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbgnDEQaroqDjsjXD9hm7P",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "2937e23f-e722-4729-bc67-8a8b944e4b91"
- },
- "type": "customer.created"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.3.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.3.json
index ee6d8dadbdb..f362e9a0578 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.3.json
@@ -2,470 +2,7 @@
"data": [
{
"api_version": "2020-08-27",
- "created": 1010000013,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 136000,
- "amount_paid": 0,
- "amount_remaining": 136000,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000014,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDIw02000oTxGMj4?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDIw02000oTxGMj4/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000005,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000006,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 136000,
- "subtotal_excluding_tax": 136000,
- "tax": null,
- "test_clock": null,
- "total": 136000,
- "total_discount_amounts": [],
- "total_excluding_tax": 136000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbh2DEQaroqDjsWSYItffi",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "6652aec6-9c03-45f1-81f2-ff44bd0ca20d"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000013,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 136000,
- "amount_paid": 0,
- "amount_remaining": 136000,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1010000014,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDE50200AArPYE5N?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDE50200AArPYE5N/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000005,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1010000006,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "open",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 136000,
- "subtotal_excluding_tax": 136000,
- "tax": null,
- "test_clock": null,
- "total": 136000,
- "total_discount_amounts": [],
- "total_excluding_tax": 136000,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "effective_at": null,
- "ending_balance": null,
- "hosted_invoice_url": null,
- "invoice_pdf": null,
- "number": null,
- "payment_intent": null,
- "rendering": {
- "pdf": {
- "page_size": "auto"
- }
- },
- "status": "draft",
- "status_transitions": {
- "finalized_at": null
- }
- }
- },
- "id": "evt_1OAbh2DEQaroqDjsJU4q7Nvm",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "6652aec6-9c03-45f1-81f2-ff44bd0ca20d"
- },
- "type": "invoice.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1010000013,
+ "created": 1010000006,
"data": {
"object": {
"amount": 136000,
@@ -487,14 +24,14 @@
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_Zs7YZA9aezamrAVjDCoOtvbpE",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_pLVLHyg9nOnVT1rhVYn4z8F1b",
"confirmation_method": "automatic",
- "created": 1010000013,
+ "created": 1010000006,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Payment for Invoice",
"id": "pi_NORMALIZED00000000000002",
- "invoice": "in_NORMALIZED00000000000002",
+ "invoice": "in_NORMALIZED00000000000001",
"last_payment_error": null,
"latest_charge": null,
"livemode": false,
@@ -530,19 +67,19 @@
"transfer_group": null
}
},
- "id": "evt_3OAbh1DEQaroqDjs1YMwrm5Y",
+ "id": "evt_3ODZbJDEQaroqDjs1K80VT7X",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "6652aec6-9c03-45f1-81f2-ff44bd0ca20d"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "8221c3a6-7b68-430b-aae7-ece9442b415b"
},
"type": "payment_intent.created"
},
{
"api_version": "2020-08-27",
- "created": 1010000014,
+ "created": 1010000007,
"data": {
"object": {
"account_country": "US",
@@ -564,7 +101,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000014,
+ "created": 1010000007,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -587,7 +124,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -601,20 +138,20 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000005,
+ "created": 1010000008,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000001",
@@ -651,8 +188,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -664,7 +201,7 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1010000009,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000002",
@@ -697,7 +234,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
@@ -753,19 +290,19 @@
"webhooks_delivered_at": null
}
},
- "id": "evt_1OAbh0DEQaroqDjs6WWlHhtr",
+ "id": "evt_1ODZbIDEQaroqDjs1thblaHv",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "0a01c75e-7704-44aa-850f-c8e9aaf40ef4"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "6213c32f-ce5d-455e-800b-6819fd8e95ae"
},
"type": "invoice.created"
},
{
"api_version": "2020-08-27",
- "created": 1010000015,
+ "created": 1010000007,
"data": {
"object": {
"amount": 184000,
@@ -775,20 +312,20 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000005,
+ "created": 1010000008,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000001",
@@ -815,19 +352,19 @@
"unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbgzDEQaroqDjskqsoqhxw",
+ "id": "evt_1ODZbIDEQaroqDjsfn4yKn56",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "886b322e-728b-4878-90dd-9f1e5c3e8c09"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "f82efb6b-cfe0-469c-ab8e-12276c2c2df3"
},
"type": "invoiceitem.created"
},
{
"api_version": "2020-08-27",
- "created": 1010000016,
+ "created": 1010000005,
"data": {
"object": {
"amount": -48000,
@@ -837,7 +374,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -850,7 +387,7 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1010000009,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000002",
@@ -877,19 +414,19 @@
"unit_amount_decimal": "-48000"
}
},
- "id": "evt_1OAbgyDEQaroqDjs7VoDu3GN",
+ "id": "evt_1ODZbIDEQaroqDjsASrSzHLU",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "4806418e-1c98-4430-828c-e1a2f983b62d"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "8b52c1fd-bc88-4c0c-8f24-64839642c15f"
},
"type": "invoiceitem.created"
},
{
"api_version": "2020-08-27",
- "created": 1010000016,
+ "created": 1010000005,
"data": {
"object": {
"address": null,
@@ -906,7 +443,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "default_payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"footer": null,
"rendering_options": null
},
@@ -929,13 +466,13 @@
"default_currency": null
}
},
- "id": "evt_1OAbgyDEQaroqDjsbTnnKikL",
+ "id": "evt_1ODZbIDEQaroqDjsqxmCltVb",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "4806418e-1c98-4430-828c-e1a2f983b62d"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "8b52c1fd-bc88-4c0c-8f24-64839642c15f"
},
"type": "customer.updated"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.4.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.4.json
index 6d922067afe..7b79117ff10 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.4.json
@@ -1,5 +1,469 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1010000006,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 136000,
+ "amount_paid": 0,
+ "amount_remaining": 136000,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": false,
+ "auto_advance": true,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1010000007,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 184000,
+ "amount_excluding_tax": 184000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000008,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 23,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000009,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": 1000000000,
+ "number": "NORMALI-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": false,
+ "paid_out_of_band": false,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "open",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": null,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 136000,
+ "subtotal_excluding_tax": 136000,
+ "tax": null,
+ "test_clock": null,
+ "total": 136000,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 136000,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODZbKDEQaroqDjsbfz78a0D",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "8221c3a6-7b68-430b-aae7-ece9442b415b"
+ },
+ "type": "invoice.finalized"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1010000006,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 136000,
+ "amount_paid": 0,
+ "amount_remaining": 136000,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": false,
+ "auto_advance": true,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1010000007,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 184000,
+ "amount_excluding_tax": 184000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1357095845,
+ "start": 1325473445
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000008,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 23,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000009,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": 1000000000,
+ "number": "NORMALI-0001",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": false,
+ "paid_out_of_band": false,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "open",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": null,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 136000,
+ "subtotal_excluding_tax": 136000,
+ "tax": null,
+ "test_clock": null,
+ "total": 136000,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 136000,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ },
+ "previous_attributes": {
+ "effective_at": null,
+ "ending_balance": null,
+ "hosted_invoice_url": null,
+ "invoice_pdf": null,
+ "number": null,
+ "payment_intent": null,
+ "rendering": {
+ "pdf": {
+ "page_size": "auto"
+ }
+ },
+ "status": "draft",
+ "status_transitions": {
+ "finalized_at": null
+ }
+ }
+ },
+ "id": "evt_1ODZbJDEQaroqDjs8kLCLXtA",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "8221c3a6-7b68-430b-aae7-ece9442b415b"
+ },
+ "type": "invoice.updated"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.5.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.5.json
new file mode 100644
index 00000000000..6d922067afe
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Event.list.5.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.create.1.json
index f78644d9809..7c81472b6ae 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.create.1.json
@@ -18,7 +18,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000014,
+ "created": 1010000007,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -41,7 +41,7 @@
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
+ "id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
@@ -55,20 +55,20 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000005,
+ "created": 1010000008,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000001",
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -118,7 +118,7 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1010000009,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000002",
@@ -151,7 +151,7 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.finalize_invoice.1.json
index c11bd67eb3b..3fbd08c0ecb 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.finalize_invoice.1.json
@@ -18,7 +18,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000014,
+ "created": 1010000007,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDE50200AArPYE5N?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDE50200AArPYE5N/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -55,20 +55,20 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000005,
+ "created": 1010000008,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000001",
@@ -105,8 +105,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -118,7 +118,7 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1010000009,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000002",
@@ -151,12 +151,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -204,5 +204,5 @@
"total_excluding_tax": 136000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.2.json
index d2c8058b296..12bf02738f6 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.2.json
@@ -20,7 +20,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000014,
+ "created": 1010000007,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDIy0200czB7KNBK?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDIy0200czB7KNBK/pdf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYz0200k2drkX3t?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYz0200k2drkX3t/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -57,20 +57,20 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000005,
+ "created": 1010000008,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000001",
@@ -107,8 +107,8 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
"object": "line_item",
@@ -120,7 +120,7 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1010000009,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000002",
@@ -153,12 +153,12 @@
"has_more": false,
"object": "list",
"total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0003",
+ "number": "NORMALI-0001",
"object": "invoice",
"on_behalf_of": null,
"paid": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.1.json
index 02153b7926d..5bcd160b6e1 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.1.json
@@ -6,7 +6,7 @@
"description": "Payment (Card ending in 4242)",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
"metadata": {},
@@ -19,7 +19,7 @@
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000006,
+ "created": 1010000009,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000002",
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.2.json
index e98994512d2..1cc7e357e24 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--InvoiceItem.create.2.json
@@ -6,20 +6,20 @@
"description": "Zulip Cloud Standard",
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
- "created": 1010000005,
+ "created": 1010000008,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_NORMALIZED00000000000001",
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.confirm.1.json
deleted file mode 100644
index f5bb2155c7f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1010000001,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKK6jtKoGMgYyAJqDjqU6LBa1EmGjEb3yqUhKzG7U6qpV7mpDP7F1K7dRpgWMQ-TNLUaUeB-cYhJJNgn8",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_aOaSQAoIvgc832z80q5JaiWbv",
- "confirmation_method": "automatic",
- "created": 1010000008,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.create.1.json
index 010ab543b53..9dc303bd5c8 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1010000001,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKK-236oGMgbWN2nUDmA6LBah4Z3Bgkq_Qz9wbuLNU_ZsAGIfmiipR-Ub-1CsDS0xXPp58vSA5hjm4z1e",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
+ "total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_aOaSQAoIvgc832z80q5JaiWbv",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_GhNIQ1qIF31zO8VOgP3Au41k0",
"confirmation_method": "automatic",
- "created": 1010000008,
+ "created": 1010000001,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
"id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.create.1.json
index 66feff50d49..3acfec23e9f 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbgqDEQaroqDjs3x014Xoe_secret_OyYopbWAJ8G6nkYyH328hn5Wa8L3DXN",
- "created": 1010000011,
+ "client_secret": "seti_1ODZbCDEQaroqDjs5e7qZTsU_secret_P1cqQFyRzDI21LCG2tNQzAgNPyX69h3",
+ "created": 1010000003,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbgqDEQaroqDjs3x014Xoe",
+ "id": "seti_1ODZbCDEQaroqDjs5e7qZTsU",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbgqDEQaroqDjs9SWEkZaq",
+ "latest_attempt": "setatt_1ODZbCDEQaroqDjsgBtwTg4F",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.list.1.json
index e963328d01c..b68925eb8e3 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbgpDEQaroqDjsR2qIpKlA_secret_OyYo6wJ52hSYocCr9bxCDmSQa6rejz3",
- "created": 1010000012,
+ "client_secret": "seti_1ODZbBDEQaroqDjsBIzEWYNw_secret_P1cqttyLH17cMH0Ev7A0pd5xtYMJyl9",
+ "created": 1010000002,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbgpDEQaroqDjsR2qIpKlA",
+ "id": "seti_1ODZbBDEQaroqDjsBIzEWYNw",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.retrieve.1.json
index 66feff50d49..3acfec23e9f 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbgqDEQaroqDjs3x014Xoe_secret_OyYopbWAJ8G6nkYyH328hn5Wa8L3DXN",
- "created": 1010000011,
+ "client_secret": "seti_1ODZbCDEQaroqDjs5e7qZTsU_secret_P1cqQFyRzDI21LCG2tNQzAgNPyX69h3",
+ "created": 1010000003,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbgqDEQaroqDjs3x014Xoe",
+ "id": "seti_1ODZbCDEQaroqDjs5e7qZTsU",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbgqDEQaroqDjs9SWEkZaq",
+ "latest_attempt": "setatt_1ODZbCDEQaroqDjsgBtwTg4F",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbgqDEQaroqDjsERlLYz74",
+ "payment_method": "pm_1ODZbCDEQaroqDjsGY2lvS6F",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.create.1.json
index 8067626d278..f8588d2ecac 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.create.1.json
@@ -8,12 +8,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000012,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02SuEXgGS5s1ALpyCDEoYS1BELKpiQqNjwVLkSlKCnJNTJc7",
+ "id": "cs_test_NORMALIZED02htS61fSjAbYMo5ud8kjdoIpopM1iMXaIRbCMUDFtrFHhgb",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbgpDEQaroqDjsR2qIpKlA",
+ "setup_intent": "seti_1ODZbBDEQaroqDjsBIzEWYNw",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02SuEXgGS5s1ALpyCDEoYS1BELKpiQqNjwVLkSlKCnJNTJc7#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02htS61fSjAbYMo5ud8kjdoIpopM1iMXaIRbCMUDFtrFHhgb#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.list.1.json
index 727f9a17d35..90c51f65b7c 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--checkout.Session.list.1.json
@@ -10,12 +10,12 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
"consent_collection": null,
- "created": 1010000012,
+ "created": 1010000002,
"currency": null,
"currency_conversion": null,
"custom_fields": [],
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02SuEXgGS5s1ALpyCDEoYS1BELKpiQqNjwVLkSlKCnJNTJc7",
+ "id": "cs_test_NORMALIZED02htS61fSjAbYMo5ud8kjdoIpopM1iMXaIRbCMUDFtrFHhgb",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbgpDEQaroqDjsR2qIpKlA",
+ "setup_intent": "seti_1ODZbBDEQaroqDjsBIzEWYNw",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02SuEXgGS5s1ALpyCDEoYS1BELKpiQqNjwVLkSlKCnJNTJc7#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02htS61fSjAbYMo5ud8kjdoIpopM1iMXaIRbCMUDFtrFHhgb#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.1.json
index cfc8347665d..4bd8d49629b 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.1.json
@@ -4,7 +4,7 @@
"created": 1010000001,
"currency": "usd",
"default_currency": "usd",
- "default_source": "src_NORMALIZED00000000000001",
+ "default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
"discount": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Event.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Event.list.1.json
index 6e4720358ff..671a950ee83 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Event.list.1.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDIw02000oTxGMj4?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvRXhCVlJJUUF3SUtxWG83UUN0anRyVWRjMFU3LDkwMDkwNDIw02000oTxGMj4/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyU1RJOXNJdEJ4cjVwYVlwa1B5R1NCbnQwSnU4LDkwNzk3MzYx0200c4RVEEUg/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -67,8 +67,8 @@
"metadata": {},
"object": "line_item",
"period": {
- "end": 1000000000,
- "start": 1000000000
+ "end": 1357095845,
+ "start": 1325473445
},
"plan": null,
"price": {
@@ -210,16 +210,16 @@
"total_excluding_tax": 136000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbh2DEQaroqDjsWSYItffi",
+ "id": "evt_1ODZbKDEQaroqDjsbfz78a0D",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "6652aec6-9c03-45f1-81f2-ff44bd0ca20d"
+ "idempotency_key": "8221c3a6-7b68-430b-aae7-ece9442b415b"
},
"type": "invoice.finalized"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.create.1.json
index e9a11ac5011..0dda043ce97 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.create.1.json
@@ -18,7 +18,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000006,
+ "created": 1010000001,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.finalize_invoice.1.json
index 5fd513e7779..cddfff9d1ce 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.finalize_invoice.1.json
@@ -18,7 +18,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000006,
+ "created": 1010000001,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvNXdrNDVxV2hzODM3QkJaeTZPRWRhdU8wYTR5LDkwMDkwNDI30200uei1fMF1?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNydjVGc3BQU3JxQnZlZ3VWTTlIYlREVGJRSWFKLDkwNzk3MzY10200ZwtduSWW?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvNXdrNDVxV2hzODM3QkJaeTZPRWRhdU8wYTR5LDkwMDkwNDI30200uei1fMF1/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNydjVGc3BQU3JxQnZlZ3VWTTlIYlREVGJRSWFKLDkwNzk3MzY10200ZwtduSWW/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 984000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.list.1.json
index 82c5ef218da..59fd565192e 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Invoice.list.1.json
@@ -20,7 +20,7 @@
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000006,
+ "created": 1010000001,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvNXdrNDVxV2hzODM3QkJaeTZPRWRhdU8wYTR5LDkwMDkwNDI502003fGlczzf?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNydjVGc3BQU3JxQnZlZ3VWTTlIYlREVGJRSWFKLDkwNzk3MzY20200NDAUk84c?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlvNXdrNDVxV2hzODM3QkJaeTZPRWRhdU8wYTR5LDkwMDkwNDI502003fGlczzf/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNydjVGc3BQU3JxQnZlZ3VWTTlIYlREVGJRSWFKLDkwNzk3MzY20200NDAUk84c/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Charge.list.1.json
deleted file mode 100644
index 029e105696e..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Charge.list.1.json
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- "data": [
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/charges"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Charge.list.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Charge.list.2.json
deleted file mode 100644
index a8c18d8ac56..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Charge.list.2.json
+++ /dev/null
@@ -1,255 +0,0 @@
-{
- "data": [
- {
- "amount": 184000,
- "amount_captured": 184000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_details": {
- "card": {
- "amount_authorized": 184000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 184000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNajtKoGMgYPxikw_zY6LBY61FgNdUSIb96JcfePc_Zy0ufAjhMwJn1U8D9KcoQgc64j8UXZlQg3yLA2",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- },
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/charges"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.2.json
deleted file mode 100644
index 0078547027a..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.2.json
+++ /dev/null
@@ -1,809 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbhDDEQaroqDjs0E7KJbEn",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "40bde32f-040e-4101-8829-8eaff30c1b2f"
- },
- "type": "payment_intent.payment_failed"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbhDDEQaroqDjs08YlVoTi",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "40bde32f-040e-4101-8829-8eaff30c1b2f"
- },
- "type": "charge.failed"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbhIDEQaroqDjsB7Fkzgwq",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "1c4c81a2-6cd9-4ceb-9458-2a1dff06a087"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhGDEQaroqDjsegKKNyrL_secret_OyYo8dY7ibBBHWimdijVhW7YF6C6k2L",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhGDEQaroqDjsegKKNyrL",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhGDEQaroqDjsxvtensZL",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhHDEQaroqDjs8inkF49b",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2539a777-e0d3-4d94-b58f-c14824c7634d"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbhHDEQaroqDjsPccHkpGl",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2539a777-e0d3-4d94-b58f-c14824c7634d"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhGDEQaroqDjsegKKNyrL_secret_OyYo8dY7ibBBHWimdijVhW7YF6C6k2L",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhGDEQaroqDjsegKKNyrL",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhGDEQaroqDjsxvtensZL",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhHDEQaroqDjsI0JWFxSi",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "2539a777-e0d3-4d94-b58f-c14824c7634d"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhEDEQaroqDjsQE4VSJWD_secret_OyYok62x0mvTGBOwF3o7TXqizRAMBov",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhEDEQaroqDjsQE4VSJWD",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhEDEQaroqDjsqhhUEtui",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "e525d8f3-9c26-4437-a908-067362073504"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbhDDEQaroqDjs0I3zLSOI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "3059d025-6d65-413f-8e5b-d613d7151f96"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbhDDEQaroqDjsnrNP73ez",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "7d802bdc-542d-4ac9-9b4e-22c05edaa8ac"
- },
- "type": "customer.created"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.5.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.5.json
deleted file mode 100644
index 479b494a605..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.5.json
+++ /dev/null
@@ -1,707 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 184000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 184000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 184000,
- "amount_captured": 184000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_details": {
- "card": {
- "amount_authorized": 184000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 184000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNCjtKoGMgb82YQ839s6LBao1uNtirRnDHC1S_qV6ZpprKipfk4cnUnpKB-SY0RCMJvv4RCHq_2HD7Ps",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_2TMTxRv8JKZ239AFBosMeJDo4",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbhPDEQaroqDjs1jToSaif",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "60793cce-0461-4b62-8111-2ab99eed9c88"
- },
- "type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 184000,
- "amount_captured": 184000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_details": {
- "card": {
- "amount_authorized": 184000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 184000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNCjtKoGMgaEXq1blFM6LBZlNy8qzJn5BI0jdofs16eQXkrhDT3Pf2ntSUpOC9sJOx_bWHrrzyiRalsD",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbhPDEQaroqDjs1xBN4s4I",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "60793cce-0461-4b62-8111-2ab99eed9c88"
- },
- "type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P"
- }
- }
- },
- "id": "evt_1OAbhTDEQaroqDjsaEfoGRYZ",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "3f58767f-3154-48d5-946b-4d40d58af530"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhRDEQaroqDjsp999cQmx_secret_OyYpwymNNbOGX7YwjAIVH1zBLPnSkyR",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhRDEQaroqDjsp999cQmx",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhRDEQaroqDjsUuquiZSa",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhSDEQaroqDjsExuh5K5z",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "369452fe-cc81-46c6-96d2-524047ed48ae"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbhSDEQaroqDjsJzwmnSXF",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "369452fe-cc81-46c6-96d2-524047ed48ae"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhRDEQaroqDjsp999cQmx_secret_OyYpwymNNbOGX7YwjAIVH1zBLPnSkyR",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhRDEQaroqDjsp999cQmx",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhRDEQaroqDjsUuquiZSa",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhSDEQaroqDjsGV9L3ntF",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "369452fe-cc81-46c6-96d2-524047ed48ae"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhQDEQaroqDjsU74GPJVF_secret_OyYpt0Yo0sPIinJKv9EjB9bomLrJPtW",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhQDEQaroqDjsU74GPJVF",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhQDEQaroqDjsjEQrOQZd",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "fbf224d7-0751-4295-820f-2abc7c70b307"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 184000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_2TMTxRv8JKZ239AFBosMeJDo4",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbhPDEQaroqDjs18QO838v",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0012",
- "idempotency_key": "b4801310-0c36-4d17-917c-f4f6e596d55a"
- },
- "type": "payment_intent.created"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.6.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.6.json
deleted file mode 100644
index 940c75464b0..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.6.json
+++ /dev/null
@@ -1,406 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": null,
- "ending_balance": null,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": null,
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "auto"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
- }
- },
- "id": "evt_1OAbhXDEQaroqDjsV675cgk8",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0013",
- "idempotency_key": "2b4f9a03-eaca-4a7b-a8d0-5ac8e1bfbb48"
- },
- "type": "invoice.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 184000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 23,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- }
- },
- "id": "evt_1OAbhWDEQaroqDjs0NXJSqPM",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0014",
- "idempotency_key": "d242e13f-4a22-41aa-a5ca-6a4a6ebeb3af"
- },
- "type": "invoiceitem.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": -184000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- }
- },
- "id": "evt_1OAbhVDEQaroqDjsnfruSwdI",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0015",
- "idempotency_key": "86d3da74-0bec-44b3-8420-a64b7d63029d"
- },
- "type": "invoiceitem.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "currency": null,
- "default_currency": null
- }
- },
- "id": "evt_1OAbhVDEQaroqDjsjEIIwYHk",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0015",
- "idempotency_key": "86d3da74-0bec-44b3-8420-a64b7d63029d"
- },
- "type": "customer.updated"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.7.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.7.json
deleted file mode 100644
index 1eacc134dd0..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Event.list.7.json
+++ /dev/null
@@ -1,697 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUz0200cmDP6dkE?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUz0200cmDP6dkE/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbhZDEQaroqDjsAlUZ4i0c",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0016",
- "idempotency_key": "325b4bd2-369b-411c-bc0d-6b262684015b"
- },
- "type": "invoice.paid"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUy0200xzz0zRld?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUy0200xzz0zRld/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- },
- "id": "evt_1OAbhYDEQaroqDjslqeEkJne",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0016",
- "idempotency_key": "325b4bd2-369b-411c-bc0d-6b262684015b"
- },
- "type": "invoice.finalized"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUy0200xzz0zRld?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUy0200xzz0zRld/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- },
- "previous_attributes": {
- "attempted": false,
- "auto_advance": true,
- "effective_at": null,
- "ending_balance": null,
- "hosted_invoice_url": null,
- "invoice_pdf": null,
- "next_payment_attempt": 1000000000,
- "number": null,
- "paid": false,
- "rendering": {
- "pdf": {
- "page_size": "auto"
- }
- },
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "paid_at": null
- }
- }
- },
- "id": "evt_1OAbhYDEQaroqDjsmb30VV9y",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0016",
- "idempotency_key": "325b4bd2-369b-411c-bc0d-6b262684015b"
- },
- "type": "invoice.updated"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.create.1.json
deleted file mode 100644
index 57b0896cd22..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.create.1.json
+++ /dev/null
@@ -1,208 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": null,
- "ending_balance": null,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": null,
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "auto"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.finalize_invoice.1.json
deleted file mode 100644
index 8e58ef238f3..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.finalize_invoice.1.json
+++ /dev/null
@@ -1,208 +0,0 @@
-{
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUy0200xzz0zRld?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDUy0200xzz0zRld/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.4.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.4.json
deleted file mode 100644
index 5286f251865..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--Invoice.list.4.json
+++ /dev/null
@@ -1,215 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDU00200ErzYiO3z?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlweWJxdkJYZFZ1TUoyODR3MnRLYWltMVl6enVZLDkwMDkwNDU00200ErzYiO3z/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 184000,
- "amount_excluding_tax": 184000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 23,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -184000,
- "amount_excluding_tax": -184000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-184000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0002",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.create.1.json
deleted file mode 100644
index 7b906fa371e..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.create.1.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "amount": -184000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000003",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
- },
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": -184000,
- "unit_amount_decimal": "-184000"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.create.2.json
deleted file mode 100644
index 2ce96de58ac..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--InvoiceItem.create.2.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "amount": 184000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "quantity": 23,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.confirm.1.json
deleted file mode 100644
index f920e78c8ab..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,643 +0,0 @@
-{
- "_message": "Your card was declined.",
- "code": "card_declined",
- "error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "param": null,
- "payment_intent": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {},
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- },
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1699549636",
- "setup_intent": null,
- "source": null,
- "type": "card_error"
- },
- "headers": {
- "Access-Control-Allow-Credentials": "true",
- "Access-Control-Allow-Methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
- "Access-Control-Allow-Origin": "*",
- "Access-Control-Expose-Headers": "Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required",
- "Access-Control-Max-Age": "300",
- "Cache-Control": "no-cache, no-store",
- "Connection": "keep-alive",
- "Content-Length": "9856",
- "Content-Security-Policy": "report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fconfirm; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'",
- "Content-Type": "application/json",
- "Date": "NORMALIZED DATETIME",
- "Idempotency-Key": "40bde32f-040e-4101-8829-8eaff30c1b2f",
- "Original-Request": "req_NORMALIZED0002",
- "Request-Id": "req_NORMALIZED0002",
- "Server": "nginx",
- "Strict-Transport-Security": "max-age=63072000; includeSubDomains; preload",
- "Stripe-Should-Retry": "false",
- "Stripe-Version": "2020-08-27",
- "Vary": "Origin",
- "X-Stripe-Routing-Context-Priority-Tier": "api-testmode"
- },
- "http_body": "{\n \"error\": {\n \"charge\": \"ch_NORMALIZED00000000000001\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_intent\": {\n \"id\": \"pi_NORMALIZED00000000000001\",\n \"object\": \"payment_intent\",\n \"amount\": 48000,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {\n }\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_NORMALIZED00000000000001\",\n \"object\": \"charge\",\n \"amount\": 48000,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": null,\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"ZULIP CLOUD STANDARD\",\n \"captured\": false,\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Upgrade to Zulip Cloud Standard, $80.0 x 6\",\n \"destination\": null,\n \"dispute\": null,\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": \"card_declined\",\n \"failure_message\": \"Your card was declined.\",\n \"fraud_details\": {\n },\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"user_email\": \"[email protected]\",\n \"type\": \"upgrade\",\n \"billing_schedule\": \"1\",\n \"price_per_license\": \"8000\",\n \"seat_count\": \"6\",\n \"realm_str\": \"zulip\",\n \"billing_modality\": \"charge_automatically\",\n \"user_id\": \"10\",\n \"license_management\": \"automatic\",\n \"realm_id\": \"2\",\n \"licenses\": \"6\"\n },\n \"on_behalf_of\": null,\n \"order\": null,\n \"outcome\": {\n \"network_status\": \"declined_by_network\",\n \"reason\": \"generic_decline\",\n \"risk_level\": \"normal\",\n \"risk_score\": 47,\n \"seller_message\": \"The bank did not return any further details with this decline.\",\n \"type\": \"issuer_declined\"\n },\n \"paid\": false,\n \"payment_intent\": \"pi_NORMALIZED00000000000001\",\n \"payment_method\": \"pm_1OAbhGDEQaroqDjs4Izpyl7P\",\n \"payment_method_details\": {\n \"card\": {\n \"amount_authorized\": null,\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"extended_authorization\": {\n \"status\": \"disabled\"\n },\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"incremental_authorization\": {\n \"status\": \"unavailable\"\n },\n \"installments\": null,\n \"last4\": \"0341\",\n \"mandate\": null,\n \"multicapture\": {\n \"status\": \"unavailable\"\n },\n \"network\": \"visa\",\n \"network_token\": {\n \"used\": false\n },\n \"overcapture\": {\n \"maximum_amount_capturable\": 48000,\n \"status\": \"unavailable\"\n },\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": \"[email protected]\",\n \"receipt_number\": null,\n \"receipt_url\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_NORMALIZED00000000000001/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": \"Zulip Cloud Standard\",\n \"statement_descriptor_suffix\": null,\n \"status\": \"failed\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n \"url\": \"/v1/charges?payment_intent=pi_NORMALIZED00000000000001\"\n },\n \"client_secret\": \"pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Upgrade to Zulip Cloud Standard, $80.0 x 6\",\n \"invoice\": null,\n \"last_payment_error\": {\n \"charge\": \"ch_NORMALIZED00000000000001\",\n \"code\": \"card_declined\",\n \"decline_code\": \"generic_decline\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"payment_method\": {\n \"id\": \"pm_1OAbhGDEQaroqDjs4Izpyl7P\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"type\": \"card_error\"\n },\n \"latest_charge\": \"ch_NORMALIZED00000000000001\",\n \"livemode\": false,\n \"metadata\": {\n \"user_email\": \"[email protected]\",\n \"type\": \"upgrade\",\n \"billing_schedule\": \"1\",\n \"price_per_license\": \"8000\",\n \"seat_count\": \"6\",\n \"realm_str\": \"zulip\",\n \"billing_modality\": \"charge_automatically\",\n \"user_id\": \"10\",\n \"license_management\": \"automatic\",\n \"realm_id\": \"2\",\n \"licenses\": \"6\"\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_configuration_details\": null,\n \"payment_method_options\": {\n \"card\": {\n \"installments\": null,\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": \"[email protected]\",\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"source\": null,\n \"statement_descriptor\": \"Zulip Cloud Standard\",\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n \"payment_method\": {\n \"id\": \"pm_1OAbhGDEQaroqDjs4Izpyl7P\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\": 2024,\n \"fingerprint\": \"NORMALIZED000001\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"0341\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1000000000,\n \"customer\": \"cus_NORMALIZED0001\",\n \"livemode\": false,\n \"metadata\": {\n },\n \"type\": \"card\"\n },\n \"request_log_url\": \"https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1699549636\",\n \"type\": \"card_error\"\n }\n}\n",
- "http_status": 402,
- "json_body": {
- "error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_intent": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- },
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "request_log_url": "https://dashboard.stripe.com/test/logs/req_NORMALIZED0002?t=1699549636",
- "type": "card_error"
- }
- },
- "param": null,
- "request_id": "req_NORMALIZED0002"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.confirm.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.confirm.2.json
deleted file mode 100644
index 84d7bb97f9d..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.confirm.2.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 184000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 184000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 184000,
- "amount_captured": 184000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_details": {
- "card": {
- "amount_authorized": 184000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 184000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKNCjtKoGMgbHP1DMSKE6LBaX55vEC_03e85tdmCVUHDjzvpkOv0jTEtJwKBCOydn9HnpUMXO_c-eQAl3",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_2TMTxRv8JKZ239AFBosMeJDo4",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.create.1.json
deleted file mode 100644
index e133885868f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.create.1.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_oYGWAp2muMdEHaIrfLBuuzto5",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.create.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.create.2.json
deleted file mode 100644
index f643e38997d..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--PaymentIntent.create.2.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "amount": 184000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
- },
- "client_secret": "pi_NORMALIZED00000000000002_secret_2TMTxRv8JKZ239AFBosMeJDo4",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 23",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.retrieve.1.json
deleted file mode 100644
index f159fbc3b9e..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.retrieve.1.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhGDEQaroqDjsegKKNyrL_secret_OyYo8dY7ibBBHWimdijVhW7YF6C6k2L",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhGDEQaroqDjsegKKNyrL",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhGDEQaroqDjsxvtensZL",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhGDEQaroqDjs4Izpyl7P",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.retrieve.2.json
deleted file mode 100644
index 27d28c5c809..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--SetupIntent.retrieve.2.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhRDEQaroqDjsp999cQmx_secret_OyYpwymNNbOGX7YwjAIVH1zBLPnSkyR",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhRDEQaroqDjsp999cQmx",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhRDEQaroqDjsUuquiZSa",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhRDEQaroqDjsm5LHZfsl",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.create.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.create.2.json
deleted file mode 100644
index 80564d4aeb0..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.create.2.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "after_expiration": null,
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "client_secret": null,
- "consent": null,
- "consent_collection": null,
- "created": 1000000000,
- "currency": null,
- "currency_conversion": null,
- "custom_fields": [],
- "custom_text": {
- "shipping_address": null,
- "submit": null,
- "terms_of_service_acceptance": null
- },
- "customer": "cus_NORMALIZED0001",
- "customer_creation": null,
- "customer_details": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "tax_exempt": null,
- "tax_ids": null
- },
- "customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03hsSgJiDVmmDlA0DfOZnPxbE1rzgK9VvTqO6klUESM10Std",
- "invoice": null,
- "invoice_creation": null,
- "livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_link": null,
- "payment_method_collection": "always",
- "payment_method_configuration_details": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "phone_number_collection": {
- "enabled": false
- },
- "recovered_from": null,
- "setup_intent": "seti_1OAbhQDEQaroqDjsU74GPJVF",
- "shipping": null,
- "shipping_address_collection": null,
- "shipping_options": [],
- "shipping_rate": null,
- "status": "open",
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03hsSgJiDVmmDlA0DfOZnPxbE1rzgK9VvTqO6klUESM10Std#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.list.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.list.2.json
deleted file mode 100644
index 8381ec60c90..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_restart_from_beginning--checkout.Session.list.2.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "data": [
- {
- "after_expiration": null,
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "client_secret": null,
- "consent": null,
- "consent_collection": null,
- "created": 1000000000,
- "currency": null,
- "currency_conversion": null,
- "custom_fields": [],
- "custom_text": {
- "shipping_address": null,
- "submit": null,
- "terms_of_service_acceptance": null
- },
- "customer": "cus_NORMALIZED0001",
- "customer_creation": null,
- "customer_details": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "tax_exempt": null,
- "tax_ids": null
- },
- "customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03hsSgJiDVmmDlA0DfOZnPxbE1rzgK9VvTqO6klUESM10Std",
- "invoice": null,
- "invoice_creation": null,
- "livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "23",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "23",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_link": null,
- "payment_method_collection": "always",
- "payment_method_configuration_details": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "phone_number_collection": {
- "enabled": false
- },
- "recovered_from": null,
- "setup_intent": "seti_1OAbhQDEQaroqDjsU74GPJVF",
- "shipping": null,
- "shipping_address_collection": null,
- "shipping_options": [],
- "shipping_rate": null,
- "status": "open",
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03hsSgJiDVmmDlA0DfOZnPxbE1rzgK9VvTqO6klUESM10Std#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/checkout/sessions"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Charge.list.1.json
deleted file mode 100644
index fc01e7f721a..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Charge.list.1.json
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- "data": [
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/charges"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Charge.list.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Charge.list.2.json
deleted file mode 100644
index db04309930c..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Charge.list.2.json
+++ /dev/null
@@ -1,255 +0,0 @@
-{
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPajtKoGMgaC_ySk-EQ6LBZyRtpjmUBwptRtP1_wZ3D8UnOHjmgMykfcCl4Vl1OSFXi8lj4P-_IzUeT3",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- },
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/charges"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.modify.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.modify.1.json
deleted file mode 100644
index 0bcde25690f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.modify.1.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.modify.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.modify.2.json
deleted file mode 100644
index c35347da852..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Customer.modify.2.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.2.json
deleted file mode 100644
index 54e7b070ca9..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Event.list.2.json
+++ /dev/null
@@ -1,543 +0,0 @@
-{
- "data": [
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbheDEQaroqDjs1WO6nOeK",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 2,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "5fc43bcc-574e-442d-889c-0028b89993ab"
- },
- "type": "charge.failed"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbhkDEQaroqDjsLZLI6UZf",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "a66ab193-9163-4bb4-be5b-27d5f2f8584c"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhhDEQaroqDjsVCPSfkT3_secret_OyYpaiLJeaZZckr9CIqqfNdyX2d9s6R",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhhDEQaroqDjsVCPSfkT3",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhhDEQaroqDjszwiAZW27",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhiDEQaroqDjs7o0LN1Pz",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "9d997d34-b406-40ae-9d38-ac7528603170"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbhiDEQaroqDjsJhTUMkPi",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "9d997d34-b406-40ae-9d38-ac7528603170"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhhDEQaroqDjsVCPSfkT3_secret_OyYpaiLJeaZZckr9CIqqfNdyX2d9s6R",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhhDEQaroqDjsVCPSfkT3",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhhDEQaroqDjszwiAZW27",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhiDEQaroqDjsXdwUXBW9",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "9d997d34-b406-40ae-9d38-ac7528603170"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhfDEQaroqDjstzEZ6SMo_secret_OyYprMvO3cUMoijhAUJZ72v0OIeyUix",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhfDEQaroqDjstzEZ6SMo",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbhfDEQaroqDjsxo4BCP3y",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "993d14a8-ead9-46c3-bcad-b6452655a1ce"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbheDEQaroqDjs1PgTEG7a",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "d6393964-09d8-4f8f-a8ee-3e8360f0f882"
- },
- "type": "payment_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": null,
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- }
- },
- "id": "evt_1OAbhdDEQaroqDjsTrZwMRjS",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "de8473ea-5f8a-4c2d-a3cc-caa333818d50"
- },
- "type": "customer.created"
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/events"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.4.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.4.json
deleted file mode 100644
index 4757e5e98bf..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--Invoice.list.4.json
+++ /dev/null
@@ -1,215 +0,0 @@
-{
- "data": [
- {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg30200JYi5WzzY?s=ap",
- "id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlwUHpzUUs1UXp4eTY5OVRpMEJUZmdyOUZ4TjBQLDkwMDkwNDg30200JYi5WzzY/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000003",
- "invoice_item": "ii_NORMALIZED00000000000003",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000004",
- "invoice_item": "ii_NORMALIZED00000000000004",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000003",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000002/lines"
- },
- "livemode": false,
- "metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0003",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
- }
- ],
- "has_more": false,
- "object": "list",
- "url": "/v1/invoices"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.confirm.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.confirm.2.json
deleted file mode 100644
index 7a8a9aa67d6..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.confirm.2.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKO-jtKoGMgZYBErcWWo6LBb4RjIzed_Hv2H2RfCJjRlkyUR99uvzhdOLrGhqQpmAm5Yq--_kJEW6_yjO",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": true,
- "object": "list",
- "total_count": 2,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.create.1.json
deleted file mode 100644
index 01a75d98d70..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.create.1.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.retrieve.1.json
deleted file mode 100644
index 66b3a80ffec..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.retrieve.1.json
+++ /dev/null
@@ -1,251 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 0,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": null,
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": false,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": "card_declined",
- "failure_message": "Your card was declined.",
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "declined_by_network",
- "reason": "generic_decline",
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "The bank did not return any further details with this decline.",
- "type": "issuer_declined"
- },
- "paid": false,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_details": {
- "card": {
- "amount_authorized": null,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "0341",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": null,
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "failed",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_NORMALIZED00000000000001",
- "code": "card_declined",
- "decline_code": "generic_decline",
- "doc_url": "https://stripe.com/docs/error-codes/card-declined",
- "message": "Your card was declined.",
- "payment_method": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "0341",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- },
- "type": "card_error"
- },
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.retrieve.2.json
deleted file mode 100644
index 65702b87031..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--PaymentIntent.retrieve.2.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKPWjtKoGMgYRNmjrtsM6LBZgnYu3CGQEYx1FDly9A0eCSEuuKLXfMeo5nKNO6ze3OyibfqJw12ueH_DP",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": true,
- "object": "list",
- "total_count": 2,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_dqFfO7BDPoBC0zkqTJNn0fjdz",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.create.1.json
deleted file mode 100644
index 0b4d8876c4f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.create.1.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhhDEQaroqDjsVCPSfkT3_secret_OyYpaiLJeaZZckr9CIqqfNdyX2d9s6R",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhhDEQaroqDjsVCPSfkT3",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhhDEQaroqDjszwiAZW27",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.create.2.json
deleted file mode 100644
index 5c0ef46470f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.create.2.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhvDEQaroqDjsy8bIZeUy_secret_OyYpHjLdyfxD0L0P2g9htsni4G85sJe",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhvDEQaroqDjsy8bIZeUy",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhvDEQaroqDjsDNwcsk05",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.list.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.list.2.json
deleted file mode 100644
index 1140fcf26a1..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.list.2.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "data": [
- {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhtDEQaroqDjsBMYqM1fx_secret_OyYpbXauiRC6Ipp9U7RJkkt9F5BiVMV",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhtDEQaroqDjsBMYqM1fx",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/setup_intents"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.retrieve.1.json
deleted file mode 100644
index 0b4d8876c4f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.retrieve.1.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhhDEQaroqDjsVCPSfkT3_secret_OyYpaiLJeaZZckr9CIqqfNdyX2d9s6R",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhhDEQaroqDjsVCPSfkT3",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhhDEQaroqDjszwiAZW27",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhhDEQaroqDjsHci1uPga",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.retrieve.2.json
deleted file mode 100644
index 5c0ef46470f..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning--SetupIntent.retrieve.2.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbhvDEQaroqDjsy8bIZeUy_secret_OyYpHjLdyfxD0L0P2g9htsni4G85sJe",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbhvDEQaroqDjsy8bIZeUy",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbhvDEQaroqDjsDNwcsk05",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbhuDEQaroqDjshYYndoFY",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.create.1.json
similarity index 96%
rename from corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--Customer.create.1.json
rename to corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.create.1.json
index 593a07ed0c8..c9219e149c0 100644
--- a/corporate/tests/stripe_fixtures/restart_payment_intent_session_errors--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.create.1.json
@@ -1,7 +1,7 @@
{
"address": null,
"balance": 0,
- "created": 1000000000,
+ "created": 1010000001,
"currency": null,
"default_currency": null,
"default_source": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.modify.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.modify.1.json
new file mode 100644
index 00000000000..d430a3566a8
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.modify.1.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.1.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.10.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.10.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.10.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.11.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.11.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.11.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.12.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.12.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.12.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.13.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.13.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.13.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.14.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.14.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.14.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.15.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.15.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.15.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.16.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.16.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.16.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.17.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.17.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.17.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.18.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.18.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.18.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.19.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.19.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.19.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.2.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.20.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.20.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.20.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.21.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.21.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.21.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.22.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.22.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.22.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.23.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.23.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.23.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.24.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.24.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.24.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.25.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.25.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.25.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.26.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.26.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.26.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.27.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.27.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.27.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.28.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.28.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.28.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.3.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.4.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.5.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.5.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.6.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.6.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.7.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.7.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.7.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.8.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.8.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.8.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.9.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.9.json
new file mode 100644
index 00000000000..f70d019dc9f
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Customer.retrieve.9.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--Invoice.list.1.json
new file mode 100644
index 00000000000..e39960ab725
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--Invoice.list.1.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/invoices"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.create.1.json
new file mode 100644
index 00000000000..cb51a4a200b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.create.1.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZbRDEQaroqDjsL47HgG3s_secret_P1cr1ByFKZm8N9qBR9t8J0Vn1p3aZJR",
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZbRDEQaroqDjsL47HgG3s",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZbRDEQaroqDjs3Q7vHzGe",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.list.1.json
new file mode 100644
index 00000000000..36a004a44b7
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.list.1.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZbQDEQaroqDjsAH1MC6my_secret_P1crnuSPvAHtH5b6Gil8gJpOliQ10HB",
+ "created": 1010000001,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZbQDEQaroqDjsAH1MC6my",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.retrieve.1.json
new file mode 100644
index 00000000000..cb51a4a200b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--SetupIntent.retrieve.1.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZbRDEQaroqDjsL47HgG3s_secret_P1cr1ByFKZm8N9qBR9t8J0Vn1p3aZJR",
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZbRDEQaroqDjsL47HgG3s",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZbRDEQaroqDjs3Q7vHzGe",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZbRDEQaroqDjsccBrqC2l",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--checkout.Session.create.1.json
new file mode 100644
index 00000000000..880511c18ea
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--checkout.Session.create.1.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000001,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED01rfo9Sx0hrojMefUb4gRqBjHatuYXo1tCSmeAh7BC7SHHrk",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZbQDEQaroqDjsAH1MC6my",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01rfo9Sx0hrojMefUb4gRqBjHatuYXo1tCSmeAh7BC7SHHrk#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_license_counts--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/upgrade_license_counts--checkout.Session.list.1.json
new file mode 100644
index 00000000000..738235a5090
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_license_counts--checkout.Session.list.1.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000001,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED01rfo9Sx0hrojMefUb4gRqBjHatuYXo1tCSmeAh7BC7SHHrk",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZbQDEQaroqDjsAH1MC6my",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01rfo9Sx0hrojMefUb4gRqBjHatuYXo1tCSmeAh7BC7SHHrk#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.modify.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.modify.1.json
index 4dfed191371..384cf83ba17 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.modify.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.modify.1.json
@@ -13,7 +13,7 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
+ "default_payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"footer": null,
"rendering_options": null
},
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.1.json
index 4c561a6be2b..9ca46544114 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.1.json
@@ -1,9 +1,9 @@
{
"address": null,
- "balance": -48000,
+ "balance": 0,
"created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
+ "currency": null,
+ "default_currency": null,
"default_source": null,
"delinquent": false,
"description": "zulip (Zulip Dev)",
@@ -13,7 +13,53 @@
"invoice_prefix": "NORMA01",
"invoice_settings": {
"custom_fields": null,
- "default_payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
"footer": null,
"rendering_options": null
},
@@ -23,7 +69,7 @@
"realm_str": "zulip"
},
"name": null,
- "next_invoice_sequence": 3,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.2.json
new file mode 100644
index 00000000000..9ca46544114
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.3.json
new file mode 100644
index 00000000000..9ca46544114
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.3.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.4.json
new file mode 100644
index 00000000000..9ca46544114
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.4.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1000000000,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.5.json
new file mode 100644
index 00000000000..f10061bf837
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Customer.retrieve.5.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": -48000,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 3,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.1.json
index 54d2be9464a..48c312ec280 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.1.json
@@ -5,27 +5,182 @@
"created": 1000000000,
"data": {
"object": {
+ "amount": 48000,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 48000,
"application": null,
+ "application_fee_amount": null,
"automatic_payment_methods": null,
+ "canceled_at": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbiADEQaroqDjsDYD3ea3l_secret_OyYpZDk6bg6U6l5bJQpBZxqV5kieJog",
+ "capture_method": "automatic",
+ "charges": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKP6V4aoGMgYR8qeHf-g6LBaSC8kosJAzxFmpm1P_TXtsQLsn_iq0DklAM6NSkL2WMGtrBMqLVmDOdUH_",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
+ },
+ "client_secret": "pi_NORMALIZED00000000000001_secret_n2PA9bGK10UW1r3fUdXEln5Zl",
+ "confirmation_method": "automatic",
"created": 1000000000,
+ "currency": "usd",
"customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiADEQaroqDjsDYD3ea3l",
- "last_setup_error": null,
- "latest_attempt": null,
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "id": "pi_NORMALIZED00000000000001",
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
- "mandate": null,
- "metadata": {},
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
"next_action": null,
- "object": "setup_intent",
+ "object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
+ "installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
@@ -34,20 +189,28 @@
"payment_method_types": [
"card"
],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
+ "processing": null,
+ "receipt_email": "[email protected]",
+ "review": null,
+ "setup_future_usage": null,
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
}
},
- "id": "evt_1OAbiADEQaroqDjs7jKcLDT3",
+ "id": "evt_3ODh2vDEQaroqDjs0vU1zo7r",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
"id": "req_NORMALIZED0001",
- "idempotency_key": "0fc425d2-bc37-456a-a216-7d7812846ac8"
+ "idempotency_key": "aa721bee-9fd2-430a-bbaa-19b03c87c827"
},
- "type": "setup_intent.created"
+ "type": "payment_intent.succeeded"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.2.json
index 537db63092e..36ffaccdb58 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.2.json
@@ -66,8 +66,8 @@
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
+ "user_email": "[email protected]",
+ "user_id": "10"
},
"object": "charge",
"on_behalf_of": null,
@@ -82,7 +82,7 @@
},
"paid": true,
"payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_details": {
"card": {
"amount_authorized": 48000,
@@ -122,9 +122,9 @@
},
"type": "card"
},
- "receipt_email": "[email protected]",
+ "receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIiktKoGMgYj-cuTwXM6LBaSZncaXmQBTQDBF2P-prnNmR_Fuj7dusS7sEVkDE3mFUSchiMnc6bbsjSp",
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKP6V4aoGMgYR8qeHf-g6LBaSC8kosJAzxFmpm1P_TXtsQLsn_iq0DklAM6NSkL2WMGtrBMqLVmDOdUH_",
"refunded": false,
"refunds": {
"data": [],
@@ -149,7 +149,7 @@
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_tSQvpcf9SVnxyIRPwvO09NZm1",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_n2PA9bGK10UW1r3fUdXEln5Zl",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
@@ -170,13 +170,13 @@
"realm_str": "zulip",
"seat_count": "6",
"type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
+ "user_email": "[email protected]",
+ "user_id": "10"
},
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -190,7 +190,7 @@
"card"
],
"processing": null,
- "receipt_email": "[email protected]",
+ "receipt_email": "[email protected]",
"review": null,
"setup_future_usage": null,
"shipping": null,
@@ -202,506 +202,18 @@
"transfer_group": null
}
},
- "id": "evt_3OAbiFDEQaroqDjs0nuTbbw7",
+ "id": "evt_3ODh2vDEQaroqDjs0vU1zo7r",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "4172d439-0850-4b56-a3e3-8538d6ef2da6"
+ "id": "req_NORMALIZED0001",
+ "idempotency_key": "aa721bee-9fd2-430a-bbaa-19b03c87c827"
},
"type": "payment_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIiktKoGMgbB1N4P5yM6LBZSVzDLqIB527lmehJiueIyVFshAXin4vRIMirSgaod-CHRNig8dyQJDAEr",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbiFDEQaroqDjs0UIHv1gE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0002",
- "idempotency_key": "4172d439-0850-4b56-a3e3-8538d6ef2da6"
- },
- "type": "charge.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": null,
- "default_currency": null,
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "footer": null,
- "rendering_options": null
- },
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
- },
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
- "shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "invoice_settings": {
- "default_payment_method": null
- }
- }
- },
- "id": "evt_1OAbiLDEQaroqDjsbg4zecdT",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0003",
- "idempotency_key": "1fe9be99-3061-4d09-ac17-3c428322335b"
- },
- "type": "customer.updated"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiHDEQaroqDjsOCeIRZ24_secret_OyYp98XXcssQ798fxlXHPY4Ce58vHe5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiHDEQaroqDjsOCeIRZ24",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiHDEQaroqDjs23NCzzL1",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbiIDEQaroqDjsDTsQSoLa",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "76fa0334-bdf9-4ba4-986e-692f09c79dcf"
- },
- "type": "setup_intent.succeeded"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "generated_from": null,
- "last4": "4242",
- "networks": {
- "available": [
- "visa"
- ],
- "preferred": null
- },
- "three_d_secure_usage": {
- "supported": true
- },
- "wallet": null
- },
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "id": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "livemode": false,
- "metadata": {},
- "object": "payment_method",
- "type": "card"
- }
- },
- "id": "evt_1OAbiIDEQaroqDjsfTg1KLMZ",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "76fa0334-bdf9-4ba4-986e-692f09c79dcf"
- },
- "type": "payment_method.attached"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiHDEQaroqDjsOCeIRZ24_secret_OyYp98XXcssQ798fxlXHPY4Ce58vHe5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiHDEQaroqDjsOCeIRZ24",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiHDEQaroqDjs23NCzzL1",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbiIDEQaroqDjsjn1daCIN",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0004",
- "idempotency_key": "76fa0334-bdf9-4ba4-986e-692f09c79dcf"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiFDEQaroqDjsdR258kk2_secret_OyYp48hGUIAbtqOsny4CtPRIiiCU2eP",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiFDEQaroqDjsdR258kk2",
- "last_setup_error": null,
- "latest_attempt": null,
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "requires_payment_method",
- "usage": "off_session"
- }
- },
- "id": "evt_1OAbiFDEQaroqDjsGslXsUON",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0005",
- "idempotency_key": "9e5b9dea-8303-4f5f-9455-f6bc567615d4"
- },
- "type": "setup_intent.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_tSQvpcf9SVnxyIRPwvO09NZm1",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": null,
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": null,
- "transfer_group": null
- }
- },
- "id": "evt_3OAbiFDEQaroqDjs0f4LrcfE",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0006",
- "idempotency_key": "de096f4f-03f9-4cea-985b-a85a9df1e018"
- },
- "type": "payment_intent.created"
}
],
- "has_more": false,
+ "has_more": true,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.3.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.3.json
index b584c8b5c9e..6fbde2f7d92 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.3.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.3.json
@@ -5,223 +5,212 @@
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
+ "amount": 48000,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
- "currency": "usd",
- "custom_fields": null,
- "customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
- "effective_at": null,
- "ending_balance": null,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": null,
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": null,
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "automatic",
+ "charges": {
"data": [
{
"amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000002",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
},
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
"currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000002",
+ "invoice": null,
"livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "12"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
},
- "proration": false,
- "proration_details": {
- "credited_items": null
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIGW4aoGMgZK3rQAybw6LBaEsNHTyVXHhTHWkr32GJU9oEyaBJm4kH_mrYF1NGqecd025NvQY68Qr-L2",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
},
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
}
],
"has_more": false,
"object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
+ "client_secret": "pi_NORMALIZED00000000000002_secret_pkLrHEAn79G8lerTkf3F1jkUs",
+ "confirmation_method": "automatic",
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "id": "pi_NORMALIZED00000000000002",
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_NORMALIZED00000000000002",
"livemode": false,
- "metadata": {},
- "next_payment_attempt": 1000000000,
- "number": null,
- "object": "invoice",
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "12"
},
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "auto"
+ "next_action": null,
+ "object": "payment_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
}
},
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": "[email protected]",
+ "review": null,
+ "setup_future_usage": null,
+ "shipping": null,
+ "source": null,
"statement_descriptor": "Zulip Cloud Standard",
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
"transfer_data": null,
- "webhooks_delivered_at": null
+ "transfer_group": null
}
},
- "id": "evt_1OAbiSDEQaroqDjs4mzFkKYs",
+ "id": "evt_3ODh2yDEQaroqDjs0RVNUHIE",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0007",
- "idempotency_key": "9f26a31a-e361-4524-bdbe-c0e7201aec48"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "976e4d5c-7124-42ec-83d7-3ca88d592e7a"
},
- "type": "invoice.created"
+ "type": "payment_intent.succeeded"
},
{
"api_version": "2020-08-27",
@@ -229,175 +218,138 @@
"data": {
"object": {
"amount": 48000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Zulip Cloud Standard",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000002",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
},
- "proration": false,
- "quantity": 6,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- }
- },
- "id": "evt_1OAbiRDEQaroqDjs5zAIpuQN",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0008",
- "idempotency_key": "d0c9bbc7-5bf9-4c60-9e99-cb40494b72ab"
- },
- "type": "invoiceitem.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "amount": -48000,
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
- "date": 1000000000,
- "description": "Payment (Card ending in 4242)",
- "discountable": false,
- "discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
- "metadata": {},
- "object": "invoiceitem",
- "period": {
- "end": 1000000000,
- "start": 1000000000
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "12"
},
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
},
- "proration": false,
- "quantity": 1,
- "subscription": null,
- "tax_rates": [],
- "test_clock": null,
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- }
- },
- "id": "evt_1OAbiQDEQaroqDjsz39TjL7O",
- "livemode": false,
- "object": "event",
- "pending_webhooks": 0,
- "request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "22dd290c-a593-4379-9818-acdeccd2ad3a"
- },
- "type": "invoiceitem.created"
- },
- {
- "api_version": "2020-08-27",
- "created": 1000000000,
- "data": {
- "object": {
- "address": null,
- "balance": 0,
- "created": 1000000000,
- "currency": "usd",
- "default_currency": "usd",
- "default_source": null,
- "delinquent": false,
- "description": "zulip (Zulip Dev)",
- "discount": null,
- "email": "[email protected]",
- "id": "cus_NORMALIZED0001",
- "invoice_prefix": "NORMA01",
- "invoice_settings": {
- "custom_fields": null,
- "default_payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "footer": null,
- "rendering_options": null
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
},
- "livemode": false,
- "metadata": {
- "realm_id": "1",
- "realm_str": "zulip"
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIGW4aoGMgYrIl3ibdM6LBYdLnQkYn0EJu_cEnkl7_oofOmww9ahe2rofW7fwvrhi8LK4Rt7FZjgv-EJ",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
},
- "name": null,
- "next_invoice_sequence": 1,
- "object": "customer",
- "phone": null,
- "preferred_locales": [],
+ "review": null,
"shipping": null,
- "tax_exempt": "none",
- "test_clock": null
- },
- "previous_attributes": {
- "currency": null,
- "default_currency": null
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
}
},
- "id": "evt_1OAbiQDEQaroqDjszwhvncg8",
+ "id": "evt_3ODh2yDEQaroqDjs0N0jsSSZ",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0009",
- "idempotency_key": "22dd290c-a593-4379-9818-acdeccd2ad3a"
+ "id": "req_NORMALIZED0002",
+ "idempotency_key": "976e4d5c-7124-42ec-83d7-3ca88d592e7a"
},
- "type": "customer.updated"
+ "type": "charge.succeeded"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.4.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.4.json
index 4fece4925c1..fac4ce6917f 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.4.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.4.json
@@ -46,9 +46,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTEw0200nIODxFEI?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTEw0200nIODxFEI/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -210,18 +210,39 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
+ },
+ "previous_attributes": {
+ "attempted": false,
+ "auto_advance": true,
+ "effective_at": null,
+ "ending_balance": null,
+ "hosted_invoice_url": null,
+ "invoice_pdf": null,
+ "next_payment_attempt": 1000000000,
+ "number": null,
+ "paid": false,
+ "rendering": {
+ "pdf": {
+ "page_size": "auto"
+ }
+ },
+ "status": "draft",
+ "status_transitions": {
+ "finalized_at": null,
+ "paid_at": null
+ }
}
},
- "id": "evt_1OAbiUDEQaroqDjsekHIw92u",
+ "id": "evt_1ODh31DEQaroqDjsPv3N6iA1",
"livemode": false,
"object": "event",
- "pending_webhooks": 0,
+ "pending_webhooks": 2,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "34852be0-f314-4a49-a560-c636b329be77"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "868ce8b6-8d77-4d3b-8c11-aba184457ea0"
},
- "type": "invoice.payment_succeeded"
+ "type": "invoice.updated"
},
{
"api_version": "2020-08-27",
@@ -238,8 +259,8 @@
"application": null,
"application_fee_amount": null,
"attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
+ "attempted": false,
+ "auto_advance": true,
"automatic_tax": {
"enabled": false,
"status": null
@@ -265,13 +286,13 @@
"discount": null,
"discounts": [],
"due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
+ "effective_at": null,
+ "ending_balance": null,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTEw0200nIODxFEI?s=ap",
+ "hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTEw0200nIODxFEI/pdf?s=ap",
+ "invoice_pdf": null,
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -384,11 +405,11 @@
},
"livemode": false,
"metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "next_payment_attempt": 1000000000,
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
- "paid": true,
+ "paid": false,
"paid_out_of_band": false,
"payment_intent": null,
"payment_settings": {
@@ -405,7 +426,7 @@
"rendering": {
"amount_tax_display": null,
"pdf": {
- "page_size": "letter"
+ "page_size": "auto"
}
},
"rendering_options": null,
@@ -413,11 +434,11 @@
"shipping_details": null,
"starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
+ "status": "draft",
"status_transitions": {
- "finalized_at": 1000000000,
+ "finalized_at": null,
"marked_uncollectible_at": null,
- "paid_at": 1000000000,
+ "paid_at": null,
"voided_at": null
},
"subscription": null,
@@ -433,485 +454,194 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
},
- "id": "evt_1OAbiUDEQaroqDjsRw6boGXa",
+ "id": "evt_1ODh30DEQaroqDjssT2hfGif",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "34852be0-f314-4a49-a560-c636b329be77"
+ "id": "req_NORMALIZED0004",
+ "idempotency_key": "d73d054f-a2f7-4dee-ad49-9d202a6b0b99"
},
- "type": "invoice.paid"
+ "type": "invoice.created"
},
{
"api_version": "2020-08-27",
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
+ "amount": 48000,
"currency": "usd",
- "custom_fields": null,
"customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
+ "date": 1000000000,
+ "description": "Zulip Cloud Standard",
+ "discountable": false,
"discounts": [],
- "due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTA50200ERMHVRcD?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTA50200ERMHVRcD/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
+ "id": "ii_NORMALIZED00000000000001",
+ "invoice": null,
"livemode": false,
"metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
+ "object": "invoiceitem",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
},
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
},
+ "proration": false,
+ "quantity": 6,
"subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
+ "tax_rates": [],
"test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
}
},
- "id": "evt_1OAbiTDEQaroqDjsn2epmbfy",
+ "id": "evt_1ODh30DEQaroqDjsa98M06yf",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "34852be0-f314-4a49-a560-c636b329be77"
+ "id": "req_NORMALIZED0005",
+ "idempotency_key": "22323a04-c14f-4a78-998d-5579aaf46bae"
},
- "type": "invoice.finalized"
+ "type": "invoiceitem.created"
},
{
"api_version": "2020-08-27",
"created": 1000000000,
"data": {
"object": {
- "account_country": "US",
- "account_name": "Kandra Labs, Inc.",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "amount_shipping": 0,
- "application": null,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": true,
- "auto_advance": false,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "manual",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1000000000,
+ "amount": -48000,
"currency": "usd",
- "custom_fields": null,
"customer": "cus_NORMALIZED0001",
- "customer_address": null,
- "customer_email": "[email protected]",
- "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,
+ "date": 1000000000,
+ "description": "Payment (Card ending in 4242)",
+ "discountable": false,
"discounts": [],
- "due_date": null,
- "effective_at": 1000000000,
- "ending_balance": 0,
- "footer": null,
- "from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTA50200ERMHVRcD?s=ap",
- "id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTA50200ERMHVRcD/pdf?s=ap",
- "last_finalization_error": null,
- "latest_revision": null,
- "lines": {
- "data": [
- {
- "amount": 48000,
- "amount_excluding_tax": 48000,
- "currency": "usd",
- "description": "Zulip Cloud Standard",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000001",
- "invoice_item": "ii_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000001",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0001",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": 8000,
- "unit_amount_decimal": "8000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 6,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "8000"
- },
- {
- "amount": -48000,
- "amount_excluding_tax": -48000,
- "currency": "usd",
- "description": "Payment (Card ending in 4242)",
- "discount_amounts": [],
- "discountable": false,
- "discounts": [],
- "id": "il_NORMALIZED00000000000002",
- "invoice_item": "ii_NORMALIZED00000000000002",
- "livemode": false,
- "metadata": {},
- "object": "line_item",
- "period": {
- "end": 1000000000,
- "start": 1000000000
- },
- "plan": null,
- "price": {
- "active": false,
- "billing_scheme": "per_unit",
- "created": 1000000000,
- "currency": "usd",
- "custom_unit_amount": null,
- "id": "price_NORMALIZED00000000000002",
- "livemode": false,
- "lookup_key": null,
- "metadata": {},
- "nickname": null,
- "object": "price",
- "product": "prod_NORMALIZED0002",
- "recurring": null,
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "one_time",
- "unit_amount": -48000,
- "unit_amount_decimal": "-48000"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": null,
- "tax_amounts": [],
- "tax_rates": [],
- "type": "invoiceitem",
- "unit_amount_excluding_tax": "-48000"
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 2,
- "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
- },
+ "id": "ii_NORMALIZED00000000000002",
+ "invoice": null,
"livemode": false,
"metadata": {},
- "next_payment_attempt": null,
- "number": "NORMALI-0001",
- "object": "invoice",
- "on_behalf_of": null,
- "paid": true,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "default_mandate": null,
- "payment_method_options": null,
- "payment_method_types": null
+ "object": "invoiceitem",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
},
- "period_end": 1000000000,
- "period_start": 1000000000,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "rendering": {
- "amount_tax_display": null,
- "pdf": {
- "page_size": "letter"
- }
- },
- "rendering_options": null,
- "shipping_cost": null,
- "shipping_details": null,
- "starting_balance": 0,
- "statement_descriptor": "Zulip Cloud Standard",
- "status": "paid",
- "status_transitions": {
- "finalized_at": 1000000000,
- "marked_uncollectible_at": null,
- "paid_at": 1000000000,
- "voided_at": null
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
},
+ "proration": false,
+ "quantity": 1,
"subscription": null,
- "subscription_details": {
- "metadata": null
- },
- "subtotal": 0,
- "subtotal_excluding_tax": 0,
- "tax": null,
+ "tax_rates": [],
"test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_excluding_tax": 0,
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ }
+ },
+ "id": "evt_1ODh30DEQaroqDjs0AYeO1ed",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "88f3a899-2ea3-4f6d-8df9-3991d659bc09"
+ },
+ "type": "invoiceitem.created"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "address": null,
+ "balance": 0,
+ "created": 1000000000,
+ "currency": "usd",
+ "default_currency": "usd",
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
},
"previous_attributes": {
- "attempted": false,
- "auto_advance": true,
- "effective_at": null,
- "ending_balance": null,
- "hosted_invoice_url": null,
- "invoice_pdf": null,
- "next_payment_attempt": 1000000000,
- "number": null,
- "paid": false,
- "rendering": {
- "pdf": {
- "page_size": "auto"
- }
- },
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "paid_at": null
- }
+ "currency": null,
+ "default_currency": null
}
},
- "id": "evt_1OAbiTDEQaroqDjsqPDUJjay",
+ "id": "evt_1ODh2zDEQaroqDjscfPsjcYM",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0010",
- "idempotency_key": "34852be0-f314-4a49-a560-c636b329be77"
+ "id": "req_NORMALIZED0006",
+ "idempotency_key": "88f3a899-2ea3-4f6d-8df9-3991d659bc09"
},
- "type": "invoice.updated"
+ "type": "customer.updated"
}
],
"has_more": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.5.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.5.json
index 6d922067afe..4df711f1567 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.5.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.5.json
@@ -1,5 +1,452 @@
{
- "data": [],
+ "data": [
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODh31DEQaroqDjsVsCAUcKT",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 2,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "868ce8b6-8d77-4d3b-8c11-aba184457ea0"
+ },
+ "type": "invoice.paid"
+ },
+ {
+ "api_version": "2020-08-27",
+ "created": 1000000000,
+ "data": {
+ "object": {
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
+ "data": [
+ {
+ "amount": 48000,
+ "amount_excluding_tax": 48000,
+ "currency": "usd",
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
+ }
+ ],
+ "has_more": false,
+ "object": "list",
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
+ },
+ "livemode": false,
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
+ "on_behalf_of": null,
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
+ }
+ },
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
+ "transfer_data": null,
+ "webhooks_delivered_at": null
+ }
+ },
+ "id": "evt_1ODh31DEQaroqDjs6V1ATwTG",
+ "livemode": false,
+ "object": "event",
+ "pending_webhooks": 0,
+ "request": {
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "868ce8b6-8d77-4d3b-8c11-aba184457ea0"
+ },
+ "type": "invoice.finalized"
+ }
+ ],
"has_more": false,
"object": "list",
"url": "/v1/events"
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.6.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.6.json
index 6f6bc38568e..906a397ae10 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.6.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.6.json
@@ -5,215 +5,226 @@
"created": 1000000000,
"data": {
"object": {
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
+ "account_country": "US",
+ "account_name": "Kandra Labs, Inc.",
+ "account_tax_ids": null,
+ "amount_due": 0,
+ "amount_paid": 0,
+ "amount_remaining": 0,
+ "amount_shipping": 0,
"application": null,
"application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
+ "attempt_count": 0,
+ "attempted": true,
+ "auto_advance": false,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_reason": "manual",
+ "charge": null,
+ "collection_method": "charge_automatically",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_fields": null,
+ "customer": "cus_NORMALIZED0001",
+ "customer_address": null,
+ "customer_email": "[email protected]",
+ "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,
+ "effective_at": 1000000000,
+ "ending_balance": 0,
+ "footer": null,
+ "from_invoice": null,
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg40200Lgjn6VKK?s=ap",
+ "id": "in_NORMALIZED00000000000001",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg40200Lgjn6VKK/pdf?s=ap",
+ "last_finalization_error": null,
+ "latest_revision": null,
+ "lines": {
"data": [
{
"amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000002",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
+ "amount_excluding_tax": 48000,
"currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000002",
- "invoice": null,
+ "description": "Zulip Cloud Standard",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
+ "invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
+ },
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
},
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
+ },
+ "quantity": 6,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "8000"
+ },
+ {
+ "amount": -48000,
+ "amount_excluding_tax": -48000,
+ "currency": "usd",
+ "description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
+ "discountable": false,
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
+ "invoice_item": "ii_NORMALIZED00000000000002",
+ "livemode": false,
+ "metadata": {},
+ "object": "line_item",
+ "period": {
+ "end": 1000000000,
+ "start": 1000000000
},
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000002",
- "payment_method": "pm_1OAbiYDEQaroqDjsPhGYMLFj",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
+ "plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "custom_unit_amount": null,
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tax_behavior": "unspecified",
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
},
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKJOktKoGMgb0CqrWLHw6LBa4wla6EaUsi_NORMALIZED00015trPhLv81P8sStb4wT8kXKxecX7T_DHn",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
+ "proration": false,
+ "proration_details": {
+ "credited_items": null
},
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
+ "quantity": 1,
+ "subscription": null,
+ "tax_amounts": [],
+ "tax_rates": [],
+ "type": "invoiceitem",
+ "unit_amount_excluding_tax": "-48000"
}
],
"has_more": false,
"object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 2,
+ "url": "/v1/invoices/in_NORMALIZED00000000000001/lines"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_7Ft1BJELt5zuvUeHIaD28tuzR",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000002",
"livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "10"
- },
- "next_action": null,
- "object": "payment_intent",
+ "metadata": {},
+ "next_payment_attempt": null,
+ "number": "NORMALI-0002",
+ "object": "invoice",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiYDEQaroqDjsPhGYMLFj",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
+ "paid": true,
+ "paid_out_of_band": false,
+ "payment_intent": null,
+ "payment_settings": {
+ "default_mandate": null,
+ "payment_method_options": null,
+ "payment_method_types": null
+ },
+ "period_end": 1000000000,
+ "period_start": 1000000000,
+ "post_payment_credit_notes_amount": 0,
+ "pre_payment_credit_notes_amount": 0,
+ "quote": null,
+ "receipt_number": null,
+ "rendering": {
+ "amount_tax_display": null,
+ "pdf": {
+ "page_size": "letter"
}
},
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
+ "rendering_options": null,
+ "shipping_cost": null,
+ "shipping_details": null,
+ "starting_balance": 0,
"statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
+ "status": "paid",
+ "status_transitions": {
+ "finalized_at": 1000000000,
+ "marked_uncollectible_at": null,
+ "paid_at": 1000000000,
+ "voided_at": null
+ },
+ "subscription": null,
+ "subscription_details": {
+ "metadata": null
+ },
+ "subtotal": 0,
+ "subtotal_excluding_tax": 0,
+ "tax": null,
+ "test_clock": null,
+ "total": 0,
+ "total_discount_amounts": [],
+ "total_excluding_tax": 0,
+ "total_tax_amounts": [],
"transfer_data": null,
- "transfer_group": null
+ "webhooks_delivered_at": null
}
},
- "id": "evt_3OAbi9DEQaroqDjs0i313AhB",
+ "id": "evt_1ODh32DEQaroqDjsqrKtFVjb",
"livemode": false,
"object": "event",
"pending_webhooks": 0,
"request": {
- "id": "req_NORMALIZED0011",
- "idempotency_key": "c933da52-47cf-4824-865b-626600687f08"
+ "id": "req_NORMALIZED0003",
+ "idempotency_key": "868ce8b6-8d77-4d3b-8c11-aba184457ea0"
},
- "type": "payment_intent.succeeded"
+ "type": "invoice.payment_succeeded"
}
],
- "has_more": true,
+ "has_more": false,
"object": "list",
"url": "/v1/events"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.7.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.7.json
new file mode 100644
index 00000000000..6d922067afe
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Event.list.7.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/events"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.1.json
index bf97c357388..245ace018ae 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTA50200ERMHVRcD?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTA50200ERMHVRcD/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTg3020041u6mHFy/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -156,7 +156,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -204,5 +204,5 @@
"total_excluding_tax": 0,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.2.json
index e43d43464d0..55bbc341810 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": -48000,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxcnJMV0h3VkdtaExtTGVrZUdQZkVSOWlOckZoLDkwMDkwNTE50200az8ix5IW?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZMGZsSnliMnlhT2JTc1QxS2JOdHZETlVSbkpwLDkwODI1OTkw0200LrehJSPn?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxcnJMV0h3VkdtaExtTGVrZUdQZkVSOWlOckZoLDkwMDkwNTE50200az8ix5IW/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZMGZsSnliMnlhT2JTc1QxS2JOdHZETlVSbkpwLDkwODI1OTkw0200LrehJSPn/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -106,7 +106,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -154,5 +154,5 @@
"total_excluding_tax": -48000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.list.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.list.2.json
index d3931a22494..91dcb08df80 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--Invoice.list.2.json
@@ -42,9 +42,9 @@
"ending_balance": -48000,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxcnJMV0h3VkdtaExtTGVrZUdQZkVSOWlOckZoLDkwMDkwNTIw0200uGUAP9yt?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZMGZsSnliMnlhT2JTc1QxS2JOdHZETlVSbkpwLDkwODI1OTkw0200LrehJSPn?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxcnJMV0h3VkdtaExtTGVrZUdQZkVSOWlOckZoLDkwMDkwNTIw0200uGUAP9yt/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZMGZsSnliMnlhT2JTc1QxS2JOdHZETlVSbkpwLDkwODI1OTkw0200LrehJSPn/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -108,7 +108,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": "NORMALI-0003",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
@@ -156,7 +156,7 @@
"total_excluding_tax": -48000,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
},
{
"account_country": "US",
@@ -200,9 +200,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTIw0200mtheEwm7?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTkw0200U0LsomuQ?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxaDRSakVSamNBSkhUaUxJdXdoNE1QeU1DVG1KLDkwMDkwNTIw0200mtheEwm7/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWtZbFlIRGJDTXJLVE91OUFpbDB3T3VqQzBWYnhlLDkwODI1OTkw0200U0LsomuQ/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -316,7 +316,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": "NORMALI-0002",
"object": "invoice",
"on_behalf_of": null,
"paid": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.confirm.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.confirm.1.json
deleted file mode 100644
index 331613140f5..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.confirm.1.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "amount": 48000,
- "amount_capturable": 0,
- "amount_details": {
- "tip": {}
- },
- "amount_received": 48000,
- "application": null,
- "application_fee_amount": null,
- "automatic_payment_methods": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "data": [
- {
- "amount": 48000,
- "amount_captured": 48000,
- "amount_refunded": 0,
- "application": null,
- "application_fee": null,
- "application_fee_amount": null,
- "balance_transaction": "txn_NORMALIZED00000000000001",
- "billing_details": {
- "address": {
- "city": null,
- "country": null,
- "line1": null,
- "line2": null,
- "postal_code": null,
- "state": null
- },
- "email": null,
- "name": null,
- "phone": null
- },
- "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
- "captured": true,
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "destination": null,
- "dispute": null,
- "disputed": false,
- "failure_balance_transaction": null,
- "failure_code": null,
- "failure_message": null,
- "fraud_details": {},
- "id": "ch_NORMALIZED00000000000001",
- "invoice": null,
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
- },
- "object": "charge",
- "on_behalf_of": null,
- "order": null,
- "outcome": {
- "network_status": "approved_by_network",
- "reason": null,
- "risk_level": "normal",
- "risk_score": 0,
- "seller_message": "Payment complete.",
- "type": "authorized"
- },
- "paid": true,
- "payment_intent": "pi_NORMALIZED00000000000001",
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "payment_method_details": {
- "card": {
- "amount_authorized": 48000,
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "pass"
- },
- "country": "US",
- "exp_month": 11,
- "exp_year": 2024,
- "extended_authorization": {
- "status": "disabled"
- },
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "incremental_authorization": {
- "status": "unavailable"
- },
- "installments": null,
- "last4": "4242",
- "mandate": null,
- "multicapture": {
- "status": "unavailable"
- },
- "network": "visa",
- "network_token": {
- "used": false
- },
- "overcapture": {
- "maximum_amount_capturable": 48000,
- "status": "unavailable"
- },
- "three_d_secure": null,
- "wallet": null
- },
- "type": "card"
- },
- "receipt_email": "[email protected]",
- "receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIektKoGMgZmrSLFst06LBYWAPPkGztWQM72KjId9O4qWIB9XHnVCC32OxfbnclwNMXrRpywtPKS8qAF",
- "refunded": false,
- "refunds": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
- },
- "review": null,
- "shipping": null,
- "source": null,
- "source_transfer": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
- }
- ],
- "has_more": false,
- "object": "list",
- "total_count": 1,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
- },
- "client_secret": "pi_NORMALIZED00000000000001_secret_tSQvpcf9SVnxyIRPwvO09NZm1",
- "confirmation_method": "automatic",
- "created": 1000000000,
- "currency": "usd",
- "customer": "cus_NORMALIZED0001",
- "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
- "invoice": null,
- "last_payment_error": null,
- "latest_charge": "ch_NORMALIZED00000000000001",
- "livemode": false,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
- },
- "next_action": null,
- "object": "payment_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "installments": null,
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "processing": null,
- "receipt_email": "[email protected]",
- "review": null,
- "setup_future_usage": null,
- "shipping": null,
- "source": null,
- "statement_descriptor": "Zulip Cloud Standard",
- "statement_descriptor_suffix": null,
- "status": "succeeded",
- "transfer_data": null,
- "transfer_group": null
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.1.json
index 219ebcfebf1..1965a61070d 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.1.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKP6V4aoGMgaG8IZZD946LBZjrmjioiTUmyLLCNxT5Zz9u52IR9pZpu_VSuTcGfEBjm7N5EzWxFvjYY-D",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_7Ft1BJELt5zuvUeHIaD28tuzR",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_n2PA9bGK10UW1r3fUdXEln5Zl",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.2.json
index 1af6cca55c7..6743e970728 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.create.2.json
@@ -4,7 +4,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -12,22 +12,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000002",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000002",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "12"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKIGW4aoGMgZZ7rAvr0k6LBaigc4TLNkMBhuVCpHKPI47PdrUKbw4NN77pAJiSz7q3kEEfAcpaRR2rQox",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
},
- "client_secret": "pi_NORMALIZED00000000000001_secret_tSQvpcf9SVnxyIRPwvO09NZm1",
+ "client_secret": "pi_NORMALIZED00000000000002_secret_pkLrHEAn79G8lerTkf3F1jkUs",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000001",
+ "id": "pi_NORMALIZED00000000000002",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000002",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -45,7 +170,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -66,7 +191,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.list.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.list.1.json
index 5776283d179..29015bda6ae 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--PaymentIntent.list.1.json
@@ -6,7 +6,7 @@
"amount_details": {
"tip": {}
},
- "amount_received": 0,
+ "amount_received": 48000,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
@@ -14,22 +14,147 @@
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
- "data": [],
+ "data": [
+ {
+ "amount": 48000,
+ "amount_captured": 48000,
+ "amount_refunded": 0,
+ "application": null,
+ "application_fee": null,
+ "application_fee_amount": null,
+ "balance_transaction": "txn_NORMALIZED00000000000001",
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "calculated_statement_descriptor": "ZULIP CLOUD STANDARD",
+ "captured": true,
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
+ "destination": null,
+ "dispute": null,
+ "disputed": false,
+ "failure_balance_transaction": null,
+ "failure_code": null,
+ "failure_message": null,
+ "fraud_details": {},
+ "id": "ch_NORMALIZED00000000000001",
+ "invoice": null,
+ "livemode": false,
+ "metadata": {
+ "billing_modality": "charge_automatically",
+ "billing_schedule": "1",
+ "license_management": "automatic",
+ "licenses": "6",
+ "price_per_license": "8000",
+ "realm_id": "1",
+ "realm_str": "zulip",
+ "seat_count": "6",
+ "type": "upgrade",
+ "user_email": "[email protected]",
+ "user_id": "10"
+ },
+ "object": "charge",
+ "on_behalf_of": null,
+ "order": null,
+ "outcome": {
+ "network_status": "approved_by_network",
+ "reason": null,
+ "risk_level": "normal",
+ "risk_score": 0,
+ "seller_message": "Payment complete.",
+ "type": "authorized"
+ },
+ "paid": true,
+ "payment_intent": "pi_NORMALIZED00000000000001",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
+ "payment_method_details": {
+ "card": {
+ "amount_authorized": 48000,
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "extended_authorization": {
+ "status": "disabled"
+ },
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "incremental_authorization": {
+ "status": "unavailable"
+ },
+ "installments": null,
+ "last4": "4242",
+ "mandate": null,
+ "multicapture": {
+ "status": "unavailable"
+ },
+ "network": "visa",
+ "network_token": {
+ "used": false
+ },
+ "overcapture": {
+ "maximum_amount_capturable": 48000,
+ "status": "unavailable"
+ },
+ "three_d_secure": null,
+ "wallet": null
+ },
+ "type": "card"
+ },
+ "receipt_email": "[email protected]",
+ "receipt_number": null,
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xN3ZUa3dERVFhcm9xRGpzKP6V4aoGMgZ81fLzrtg6LBbZmWJlrP_Ec_caqksN3jvIogaSZe2GoOvR69FJ2uu2XX0RCOS7Sjxau5Sm",
+ "refunded": false,
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
+ "review": null,
+ "shipping": null,
+ "source": null,
+ "source_transfer": null,
+ "statement_descriptor": "Zulip Cloud Standard",
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ ],
"has_more": false,
"object": "list",
- "total_count": 0,
- "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000002"
+ "total_count": 1,
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_NORMALIZED00000000000002_secret_7Ft1BJELt5zuvUeHIaD28tuzR",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_n2PA9bGK10UW1r3fUdXEln5Zl",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
"description": "Upgrade to Zulip Cloud Standard, $80.0 x 6",
- "id": "pi_NORMALIZED00000000000002",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": null,
"last_payment_error": null,
- "latest_charge": null,
+ "latest_charge": "ch_NORMALIZED00000000000001",
"livemode": false,
"metadata": {
"billing_modality": "charge_automatically",
@@ -47,7 +172,7 @@
"next_action": null,
"object": "payment_intent",
"on_behalf_of": null,
- "payment_method": null,
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -68,7 +193,7 @@
"source": null,
"statement_descriptor": "Zulip Cloud Standard",
"statement_descriptor_suffix": null,
- "status": "requires_payment_method",
+ "status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.1.json
index a244d1e5422..20e841d0de3 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbiHDEQaroqDjsOCeIRZ24_secret_OyYp98XXcssQ798fxlXHPY4Ce58vHe5",
+ "client_secret": "seti_1ODh2sDEQaroqDjstpH3jLtE_secret_P1kXrubXJMQWkYhUmQzB5Fs4lTY6jvw",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbiHDEQaroqDjsOCeIRZ24",
+ "id": "seti_1ODh2sDEQaroqDjstpH3jLtE",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbiHDEQaroqDjs23NCzzL1",
+ "latest_attempt": "setatt_1ODh2sDEQaroqDjsFRO6SBwx",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.2.json
deleted file mode 100644
index 2d6d8e1fb08..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.create.2.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiXDEQaroqDjsgDAW02hc_secret_OyYqLHQki8fyfwRi1VQDWnFR5r0hzcT",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiXDEQaroqDjsgDAW02hc",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiXDEQaroqDjs8oUOx7bU",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiXDEQaroqDjs2QVg3XXN",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.1.json
index 41e948f6ba2..71656412c44 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.1.json
@@ -4,12 +4,12 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbiFDEQaroqDjsdR258kk2_secret_OyYp48hGUIAbtqOsny4CtPRIiiCU2eP",
+ "client_secret": "seti_1ODh2qDEQaroqDjsqaQ7wTz2_secret_P1kXSWXueZCEQQwWc7kZMhjqusBNUtR",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbiFDEQaroqDjsdR258kk2",
+ "id": "seti_1ODh2qDEQaroqDjsqaQ7wTz2",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.2.json
deleted file mode 100644
index 7d3a76ee7b1..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.list.2.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "data": [
- {
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiHDEQaroqDjsOCeIRZ24_secret_OyYp98XXcssQ798fxlXHPY4Ce58vHe5",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiHDEQaroqDjsOCeIRZ24",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiHDEQaroqDjs23NCzzL1",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/setup_intents"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.1.json
index a244d1e5422..20e841d0de3 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.1.json
@@ -2,21 +2,21 @@
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
- "client_secret": "seti_1OAbiHDEQaroqDjsOCeIRZ24_secret_OyYp98XXcssQ798fxlXHPY4Ce58vHe5",
+ "client_secret": "seti_1ODh2sDEQaroqDjstpH3jLtE_secret_P1kXrubXJMQWkYhUmQzB5Fs4lTY6jvw",
"created": 1000000000,
"customer": "cus_NORMALIZED0001",
"description": null,
"flow_directions": null,
- "id": "seti_1OAbiHDEQaroqDjsOCeIRZ24",
+ "id": "seti_1ODh2sDEQaroqDjstpH3jLtE",
"last_setup_error": null,
- "latest_attempt": "setatt_1OAbiHDEQaroqDjs23NCzzL1",
+ "latest_attempt": "setatt_1ODh2sDEQaroqDjsFRO6SBwx",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
- "payment_method": "pm_1OAbiHDEQaroqDjsalM1KNGd",
+ "payment_method": "pm_1ODh2sDEQaroqDjsmfEsctj6",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.2.json
deleted file mode 100644
index 2d6d8e1fb08..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--SetupIntent.retrieve.2.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "application": null,
- "automatic_payment_methods": null,
- "cancellation_reason": null,
- "client_secret": "seti_1OAbiXDEQaroqDjsgDAW02hc_secret_OyYqLHQki8fyfwRi1VQDWnFR5r0hzcT",
- "created": 1000000000,
- "customer": "cus_NORMALIZED0001",
- "description": null,
- "flow_directions": null,
- "id": "seti_1OAbiXDEQaroqDjsgDAW02hc",
- "last_setup_error": null,
- "latest_attempt": "setatt_1OAbiXDEQaroqDjs8oUOx7bU",
- "livemode": false,
- "mandate": null,
- "metadata": {},
- "next_action": null,
- "object": "setup_intent",
- "on_behalf_of": null,
- "payment_method": "pm_1OAbiXDEQaroqDjs2QVg3XXN",
- "payment_method_configuration_details": null,
- "payment_method_options": {
- "card": {
- "mandate_options": null,
- "network": null,
- "request_three_d_secure": "automatic"
- }
- },
- "payment_method_types": [
- "card"
- ],
- "single_use_mandate": null,
- "status": "succeeded",
- "usage": "off_session"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.1.json
index de6714af92e..44d4ccc3d27 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.1.json
@@ -8,7 +8,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -34,22 +34,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02caxABicarL64YmdMXxI7HHzUwRHIjqjrigTg0eEKnepG6M",
+ "id": "cs_test_NORMALIZED021NkMCPp6UzQNRA61Gd81ENOU3WTsuOlnVLZqDnwZrdmAAm",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -67,7 +58,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbiADEQaroqDjsDYD3ea3l",
+ "setup_intent": "seti_1ODh2qDEQaroqDjsqaQ7wTz2",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -78,5 +69,5 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02caxABicarL64YmdMXxI7HHzUwRHIjqjrigTg0eEKnepG6M#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED021NkMCPp6UzQNRA61Gd81ENOU3WTsuOlnVLZqDnwZrdmAAm#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.2.json
deleted file mode 100644
index 9eefd792785..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.create.2.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "after_expiration": null,
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "client_secret": null,
- "consent": null,
- "consent_collection": null,
- "created": 1000000000,
- "currency": null,
- "currency_conversion": null,
- "custom_fields": [],
- "custom_text": {
- "shipping_address": null,
- "submit": null,
- "terms_of_service_acceptance": null
- },
- "customer": "cus_NORMALIZED0001",
- "customer_creation": null,
- "customer_details": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "tax_exempt": null,
- "tax_ids": null
- },
- "customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03KMMxNTEG63tS0ol16odKEKmYU5cF3AW8ljllC3REvO5HHp",
- "invoice": null,
- "invoice_creation": null,
- "livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_link": null,
- "payment_method_collection": "always",
- "payment_method_configuration_details": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "phone_number_collection": {
- "enabled": false
- },
- "recovered_from": null,
- "setup_intent": "seti_1OAbiFDEQaroqDjsdR258kk2",
- "shipping": null,
- "shipping_address_collection": null,
- "shipping_options": [],
- "shipping_rate": null,
- "status": "open",
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03KMMxNTEG63tS0ol16odKEKmYU5cF3AW8ljllC3REvO5HHp#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.1.json
index 059e0a7eea5..b71bf157966 100644
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.1.json
@@ -10,7 +10,7 @@
"status": null
},
"billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
+ "cancel_url": "http://zulip.testserver/upgrade/",
"client_reference_id": null,
"client_secret": null,
"consent": null,
@@ -36,22 +36,13 @@
},
"customer_email": null,
"expires_at": 1000000000,
- "id": "cs_test_NORMALIZED02caxABicarL64YmdMXxI7HHzUwRHIjqjrigTg0eEKnepG6M",
+ "id": "cs_test_NORMALIZED021NkMCPp6UzQNRA61Gd81ENOU3WTsuOlnVLZqDnwZrdmAAm",
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
+ "type": "card_update",
"user_id": "10"
},
"mode": "setup",
@@ -69,7 +60,7 @@
"enabled": false
},
"recovered_from": null,
- "setup_intent": "seti_1OAbiADEQaroqDjsDYD3ea3l",
+ "setup_intent": "seti_1ODh2qDEQaroqDjsqaQ7wTz2",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
@@ -80,7 +71,7 @@
"success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
"total_details": null,
"ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED02caxABicarL64YmdMXxI7HHzUwRHIjqjrigTg0eEKnepG6M#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED021NkMCPp6UzQNRA61Gd81ENOU3WTsuOlnVLZqDnwZrdmAAm#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
],
"has_more": true,
diff --git a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.2.json b/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.2.json
deleted file mode 100644
index c87be73006c..00000000000
--- a/corporate/tests/stripe_fixtures/upgrade_race_condition_during_card_upgrade--checkout.Session.list.2.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "data": [
- {
- "after_expiration": null,
- "allow_promotion_codes": null,
- "amount_subtotal": null,
- "amount_total": null,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_address_collection": null,
- "cancel_url": "http://zulip.testserver/billing/",
- "client_reference_id": null,
- "client_secret": null,
- "consent": null,
- "consent_collection": null,
- "created": 1000000000,
- "currency": null,
- "currency_conversion": null,
- "custom_fields": [],
- "custom_text": {
- "shipping_address": null,
- "submit": null,
- "terms_of_service_acceptance": null
- },
- "customer": "cus_NORMALIZED0001",
- "customer_creation": null,
- "customer_details": {
- "address": null,
- "email": "[email protected]",
- "name": null,
- "phone": null,
- "tax_exempt": null,
- "tax_ids": null
- },
- "customer_email": null,
- "expires_at": 1000000000,
- "id": "cs_test_NORMALIZED03KMMxNTEG63tS0ol16odKEKmYU5cF3AW8ljllC3REvO5HHp",
- "invoice": null,
- "invoice_creation": null,
- "livemode": false,
- "locale": null,
- "metadata": {
- "billing_modality": "charge_automatically",
- "billing_schedule": "1",
- "license_management": "automatic",
- "licenses": "6",
- "price_per_license": "8000",
- "realm_id": "1",
- "realm_str": "zulip",
- "seat_count": "6",
- "type": "upgrade",
- "user_email": "[email protected]",
- "user_id": "12"
- },
- "mode": "setup",
- "object": "checkout.session",
- "payment_intent": null,
- "payment_link": null,
- "payment_method_collection": "always",
- "payment_method_configuration_details": null,
- "payment_method_options": {},
- "payment_method_types": [
- "card"
- ],
- "payment_status": "no_payment_required",
- "phone_number_collection": {
- "enabled": false
- },
- "recovered_from": null,
- "setup_intent": "seti_1OAbiFDEQaroqDjsdR258kk2",
- "shipping": null,
- "shipping_address_collection": null,
- "shipping_options": [],
- "shipping_rate": null,
- "status": "open",
- "submit_type": null,
- "subscription": null,
- "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
- "total_details": null,
- "ui_mode": "hosted",
- "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED03KMMxNTEG63tS0ol16odKEKmYU5cF3AW8ljllC3REvO5HHp#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
- }
- ],
- "has_more": true,
- "object": "list",
- "url": "/v1/checkout/sessions"
-}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.create.1.json
new file mode 100644
index 00000000000..c9219e149c0
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.create.1.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": null,
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.modify.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.modify.1.json
new file mode 100644
index 00000000000..a3713782d28
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.modify.1.json
@@ -0,0 +1,33 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": "pm_1ODZbfDEQaroqDjstc11crae",
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.retrieve.1.json
new file mode 100644
index 00000000000..05b62296b91
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.retrieve.1.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbfDEQaroqDjstc11crae",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.retrieve.2.json
new file mode 100644
index 00000000000..05b62296b91
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Customer.retrieve.2.json
@@ -0,0 +1,79 @@
+{
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "currency": null,
+ "default_currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": "zulip (Zulip Dev)",
+ "discount": null,
+ "email": "[email protected]",
+ "id": "cus_NORMALIZED0001",
+ "invoice_prefix": "NORMA01",
+ "invoice_settings": {
+ "custom_fields": null,
+ "default_payment_method": {
+ "billing_details": {
+ "address": {
+ "city": null,
+ "country": null,
+ "line1": null,
+ "line2": null,
+ "postal_code": null,
+ "state": null
+ },
+ "email": null,
+ "name": null,
+ "phone": null
+ },
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 11,
+ "exp_year": 2024,
+ "fingerprint": "NORMALIZED000001",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4242",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "id": "pm_1ODZbfDEQaroqDjstc11crae",
+ "livemode": false,
+ "metadata": {},
+ "object": "payment_method",
+ "type": "card"
+ },
+ "footer": null,
+ "rendering_options": null
+ },
+ "livemode": false,
+ "metadata": {
+ "realm_id": "1",
+ "realm_str": "zulip"
+ },
+ "name": null,
+ "next_invoice_sequence": 1,
+ "object": "customer",
+ "phone": null,
+ "preferred_locales": [],
+ "shipping": null,
+ "tax_exempt": "none",
+ "test_clock": null
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Invoice.list.1.json
new file mode 100644
index 00000000000..e39960ab725
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--Invoice.list.1.json
@@ -0,0 +1,6 @@
+{
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "url": "/v1/invoices"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.create.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.create.1.json
new file mode 100644
index 00000000000..fd5d244c9d5
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.create.1.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZbfDEQaroqDjslmuU7X3U_secret_P1crT3ndzPAc49qMJcMsQBChNpwKKeV",
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZbfDEQaroqDjslmuU7X3U",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZbfDEQaroqDjsQXqtVE5L",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZbfDEQaroqDjstc11crae",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.list.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.list.1.json
new file mode 100644
index 00000000000..8943bd9049e
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.list.1.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZbeDEQaroqDjsZZmjuZPx_secret_P1crSUT0AepAUhAJUTrQ6yeYydfWO3w",
+ "created": 1010000003,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZbeDEQaroqDjsZZmjuZPx",
+ "last_setup_error": null,
+ "latest_attempt": null,
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "requires_payment_method",
+ "usage": "off_session"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/setup_intents"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.retrieve.1.json
new file mode 100644
index 00000000000..fd5d244c9d5
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--SetupIntent.retrieve.1.json
@@ -0,0 +1,34 @@
+{
+ "application": null,
+ "automatic_payment_methods": null,
+ "cancellation_reason": null,
+ "client_secret": "seti_1ODZbfDEQaroqDjslmuU7X3U_secret_P1crT3ndzPAc49qMJcMsQBChNpwKKeV",
+ "created": 1010000002,
+ "customer": "cus_NORMALIZED0001",
+ "description": null,
+ "flow_directions": null,
+ "id": "seti_1ODZbfDEQaroqDjslmuU7X3U",
+ "last_setup_error": null,
+ "latest_attempt": "setatt_1ODZbfDEQaroqDjsQXqtVE5L",
+ "livemode": false,
+ "mandate": null,
+ "metadata": {},
+ "next_action": null,
+ "object": "setup_intent",
+ "on_behalf_of": null,
+ "payment_method": "pm_1ODZbfDEQaroqDjstc11crae",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "single_use_mandate": null,
+ "status": "succeeded",
+ "usage": "off_session"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--checkout.Session.create.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--checkout.Session.create.1.json
new file mode 100644
index 00000000000..85b51f79435
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--checkout.Session.create.1.json
@@ -0,0 +1,73 @@
+{
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000003,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED01EqabbIXzt7dEgjcej0rN6L6bEsqv8MdTKbJKAhFc31P4v3",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZbeDEQaroqDjsZZmjuZPx",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01EqabbIXzt7dEgjcej0rN6L6bEsqv8MdTKbJKAhFc31P4v3#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+}
diff --git a/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--checkout.Session.list.1.json b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--checkout.Session.list.1.json
new file mode 100644
index 00000000000..6ac139acd9b
--- /dev/null
+++ b/corporate/tests/stripe_fixtures/upgrade_with_uncaught_exception--checkout.Session.list.1.json
@@ -0,0 +1,80 @@
+{
+ "data": [
+ {
+ "after_expiration": null,
+ "allow_promotion_codes": null,
+ "amount_subtotal": null,
+ "amount_total": null,
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
+ "billing_address_collection": null,
+ "cancel_url": "http://zulip.testserver/upgrade/",
+ "client_reference_id": null,
+ "client_secret": null,
+ "consent": null,
+ "consent_collection": null,
+ "created": 1010000003,
+ "currency": null,
+ "currency_conversion": null,
+ "custom_fields": [],
+ "custom_text": {
+ "shipping_address": null,
+ "submit": null,
+ "terms_of_service_acceptance": null
+ },
+ "customer": "cus_NORMALIZED0001",
+ "customer_creation": null,
+ "customer_details": {
+ "address": null,
+ "email": "[email protected]",
+ "name": null,
+ "phone": null,
+ "tax_exempt": null,
+ "tax_ids": null
+ },
+ "customer_email": null,
+ "expires_at": 1000000000,
+ "id": "cs_test_NORMALIZED01EqabbIXzt7dEgjcej0rN6L6bEsqv8MdTKbJKAhFc31P4v3",
+ "invoice": null,
+ "invoice_creation": null,
+ "livemode": false,
+ "locale": null,
+ "metadata": {
+ "type": "card_update",
+ "user_id": "10"
+ },
+ "mode": "setup",
+ "object": "checkout.session",
+ "payment_intent": null,
+ "payment_link": null,
+ "payment_method_collection": "always",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {},
+ "payment_method_types": [
+ "card"
+ ],
+ "payment_status": "no_payment_required",
+ "phone_number_collection": {
+ "enabled": false
+ },
+ "recovered_from": null,
+ "setup_intent": "seti_1ODZbeDEQaroqDjsZZmjuZPx",
+ "shipping": null,
+ "shipping_address_collection": null,
+ "shipping_options": [],
+ "shipping_rate": null,
+ "status": "open",
+ "submit_type": null,
+ "subscription": null,
+ "success_url": "http://zulip.testserver/billing/event_status?stripe_session_id={CHECKOUT_SESSION_ID}",
+ "total_details": null,
+ "ui_mode": "hosted",
+ "url": "https://checkout.stripe.com/c/pay/cs_test_NORMALIZED01EqabbIXzt7dEgjcej0rN6L6bEsqv8MdTKbJKAhFc31P4v3#fidkdWxOYHwnPyd1blpxYHZxWl1UZjFOczZJXUE2PUpzUWNPV2ZpdlFzUCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
+ }
+ ],
+ "has_more": true,
+ "object": "list",
+ "url": "/v1/checkout/sessions"
+}
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.1.json
index a133c4ec3b7..ab79c9d2478 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTI20200Fnm5yz9n?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzg40200ky8xybFL?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTI20200Fnm5yz9n/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzg40200ky8xybFL/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
@@ -154,5 +154,5 @@
"total_excluding_tax": 6400,
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": 1000000000
+ "webhooks_delivered_at": null
}
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.2.json
index 7a3d2816d63..fb2b8e50e35 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.finalize_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTI40200mYr2Fvoh?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzkw0200MPHsqzW1?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTI40200mYr2Fvoh/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzkw0200MPHsqzW1/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.1.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.1.json
index b37d860ddeb..a0a44a8486e 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.1.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTI40200FJBZsbwI?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzkw0200ct8hFQNp?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTI40200FJBZsbwI/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzkw0200ct8hFQNp/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.3.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.3.json
index 07ec31981bf..2c7cc7e3406 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.3.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTMx0200OVjoj8Ac?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzkx0200NZcxvDdE?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTMx0200OVjoj8Ac/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzkx0200NZcxvDdE/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.4.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.4.json
index 328ae96a521..2be6bb29903 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.4.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTMx0200ctTWhpMw?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzky0200NluE0p8S?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTMx0200ctTWhpMw/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzky0200NluE0p8S/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.6.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.6.json
index bddc3fcbe12..1ddb2834ad7 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.6.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.list.6.json
@@ -42,9 +42,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTMz0200xD5gHPgw?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzkz020060PkUu6Z?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTMz0200xD5gHPgw/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzkz020060PkUu6Z/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.1.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.1.json
index 76ee8eb4741..701e62d6ebf 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.1.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTI50200Th6rzNzt?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzkx0200NZcxvDdE?s=ap",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxb3VzaWVjRmtXeWZ1Rkx3aFZ5ZFdiVFRNNDBVLDkwMDkwNTI50200Th6rzNzt/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyY3AzdlRpaElCOTB6QXVZRkh2RFAyYWhzWlhPLDkwNzk3Mzkx0200NZcxvDdE/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.2.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.2.json
index 0133da91ac9..b2a9f767285 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.2.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.void_invoice.2.json
@@ -40,9 +40,9 @@
"ending_balance": 0,
"footer": null,
"from_invoice": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTMx0200ctTWhpMw?s=ap",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzky0200NluE0p8S?s=ap",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9PeVlxQWFxWmY2elluMmdydGJrdlhVMmJLREVYakY5LDkwMDkwNTMx0200ctTWhpMw/pdf?s=ap",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/test_NORMALIZED01a3dERVFhcm9xRGpzLF9QMWNyRVhEdW9NQUpJUm5Pb3JhcTBxOU1Kc2Y0RTBjLDkwNzk3Mzky0200NluE0p8S/pdf?s=ap",
"last_finalization_error": null,
"latest_revision": null,
"lines": {
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index b77449aa354..7fbc9d992b3 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -87,7 +87,6 @@ from corporate.models import (
Event,
LicenseLedger,
PaymentIntent,
- Session,
ZulipSponsorshipRequest,
get_current_plan_by_customer,
get_current_plan_by_realm,
@@ -529,18 +528,43 @@ class StripeTestCase(ZulipTestCase):
self.send_stripe_webhook_event(event)
most_recent_event = events_old_to_new[-1]
- def send_last_stripe_webhook_event(self) -> None:
- [last_event] = iter(stripe.Event.list(limit=1))
- self.send_stripe_webhook_event(last_event)
+ def add_card_to_customer_for_upgrade(self, charge_succeeds: bool = True) -> None:
+ start_session_json_response = self.client_post(
+ "/json/upgrade/session/start_card_update_session"
+ )
+ response_dict = self.assert_json_success(start_session_json_response)
+ self.assert_details_of_valid_session_from_event_status_endpoint(
+ response_dict["stripe_session_id"],
+ {
+ "type": "card_update_from_upgrade_page",
+ "status": "created",
+ },
+ )
+ self.trigger_stripe_checkout_session_completed_webhook(
+ self.get_test_card_string(
+ attaches_to_customer=True,
+ charge_succeeds=charge_succeeds,
+ card_provider="visa",
+ )
+ )
+ response_dict = self.assert_json_success(start_session_json_response)
+ self.assert_details_of_valid_session_from_event_status_endpoint(
+ response_dict["stripe_session_id"],
+ {
+ "type": "card_update_from_upgrade_page",
+ "status": "completed",
+ "event_handler": {"status": "succeeded"},
+ },
+ )
def upgrade(
self,
invoice: bool = False,
talk_to_stripe: bool = True,
onboarding: bool = False,
- payment_method: str = "pm_card_visa",
upgrade_page_response: Optional["TestHttpResponse"] = None,
del_args: Sequence[str] = [],
+ dont_confirm_payment: bool = False,
**kwargs: Any,
) -> "TestHttpResponse":
if upgrade_page_response is None:
@@ -576,31 +600,50 @@ class StripeTestCase(ZulipTestCase):
upgrade_json_response = self.client_post("/json/billing/upgrade", params)
- if invoice or not talk_to_stripe:
+ if upgrade_json_response.status_code != 200 or dont_confirm_payment:
+ # Return early if the upgrade request failed.
return upgrade_json_response
- expected_session_details = {"status": "created"}
- if is_free_trial_offer_enabled():
- if onboarding:
- expected_session_details["type"] = "free_trial_upgrade_from_onboarding_page"
- else:
- expected_session_details["type"] = "free_trial_upgrade_from_billing_page"
- else:
- last_stripe_payment_intent = PaymentIntent.objects.last()
- assert last_stripe_payment_intent is not None
- expected_session_details["type"] = "upgrade_from_billing_page"
- expected_session_details[
- "stripe_payment_intent_id"
- ] = last_stripe_payment_intent.stripe_payment_intent_id
+ if invoice or not talk_to_stripe or is_free_trial_offer_enabled():
+ # Upgrade already happened for free trial or invoice realms.
+ return upgrade_json_response
+
+ last_stripe_payment_intent = PaymentIntent.objects.last()
+ assert last_stripe_payment_intent is not None
response_dict = self.assert_json_success(upgrade_json_response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"], expected_session_details
+ self.assertEqual(
+ response_dict["stripe_payment_intent_id"],
+ last_stripe_payment_intent.stripe_payment_intent_id,
)
- self.trigger_stripe_checkout_session_completed_webhook(payment_method)
+
+ # Verify that the payment was successful.
+ self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
+ last_stripe_payment_intent.stripe_payment_intent_id,
+ {"status": "succeeded"},
+ )
+
+ # Upgrade the organization.
self.send_stripe_webhook_events(last_event)
return upgrade_json_response
+ def add_card_and_upgrade(self, user: UserProfile, **kwargs: Any) -> stripe.Customer:
+ # Add card
+ with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
+ self.add_card_to_customer_for_upgrade()
+
+ # Check that we correctly created a Customer object in Stripe
+ stripe_customer = stripe_get_customer(
+ assert_is_not_none(Customer.objects.get(realm=user.realm).stripe_customer_id)
+ )
+ self.assertTrue(stripe_customer_has_credit_card_as_default_payment_method(stripe_customer))
+
+ with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
+ response = self.upgrade(**kwargs)
+ self.assert_json_success(response)
+
+ return stripe_customer
+
# Upgrade without talking to Stripe
def local_upgrade(
self,
@@ -688,36 +731,16 @@ class StripeTest(StripeTestCase):
response = self.client_get("/upgrade/")
self.assert_in_success_response(["Your subscription will renew automatically"], response)
self.assertNotEqual(user.realm.plan_type, Realm.PLAN_TYPE_STANDARD)
+ # This also means there is no card set as default payment method set for the user.
self.assertFalse(Customer.objects.filter(realm=user.realm).exists())
- # Click "Make payment" in Stripe Checkout
- with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
+ # Click "Purchase Zulip Cloud Standard" without adding a card.
+ with self.assertLogs("corporate.stripe", "WARNING"):
response = self.upgrade()
- [payment_intent] = PaymentIntent.objects.all()
- assert payment_intent.stripe_payment_intent_id is not None
+ self.assert_json_error(response, "Please add a credit card before upgrading.")
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- "event_handler": {
- "status": "succeeded",
- },
- },
- )
- self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- payment_intent.stripe_payment_intent_id,
- {"status": "succeeded", "event_handler": {"status": "succeeded"}},
- )
+ stripe_customer = self.add_card_and_upgrade(user)
- # Check that we correctly created a Customer object in Stripe
- stripe_customer = stripe_get_customer(
- assert_is_not_none(Customer.objects.get(realm=user.realm).stripe_customer_id)
- )
- self.assertTrue(stripe_customer_has_credit_card_as_default_payment_method(stripe_customer))
self.assertEqual(stripe_customer.description, "zulip (Zulip Dev)")
self.assertEqual(stripe_customer.discount, None)
self.assertEqual(stripe_customer.email, user.delivery_email)
@@ -864,6 +887,19 @@ class StripeTest(StripeTestCase):
response,
)
+ @mock_stripe(tested_timestamp_fields=["created"])
+ def test_card_attached_to_customer_but_payment_fails(self, *mocks: Mock) -> None:
+ user = self.example_user("hamlet")
+ self.login_user(user)
+ self.add_card_to_customer_for_upgrade(charge_succeeds=False)
+ with self.assertLogs("corporate.stripe", "WARNING"):
+ response = self.upgrade()
+ self.assert_json_error_contains(response, "Your card was declined.")
+
+ # Customer added a card which always requires authentication, we cannot
+ # use these cards for automatic payments.
+ # TODO: Add a test case for it here.
+
@mock_stripe(tested_timestamp_fields=["created"])
def test_upgrade_by_invoice(self, *mocks: Mock) -> None:
user = self.example_user("hamlet")
@@ -1004,26 +1040,17 @@ class StripeTest(StripeTestCase):
self.assertNotEqual(user.realm.plan_type, Realm.PLAN_TYPE_STANDARD)
self.assertFalse(Customer.objects.filter(realm=user.realm).exists())
+ # Require free trial users to add a credit card.
with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- response = self.upgrade()
- self.assertEqual(PaymentIntent.objects.count(), 0)
-
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "free_trial_upgrade_from_billing_page",
- "status": "completed",
- "event_handler": {"status": "succeeded"},
- },
+ with self.assertLogs("corporate.stripe", "WARNING"):
+ response = self.upgrade()
+ self.assert_json_error(
+ response, "Please add a credit card before starting your free trial."
)
- stripe_customer = stripe_get_customer(
- assert_is_not_none(Customer.objects.get(realm=user.realm).stripe_customer_id)
- )
- self.assertTrue(
- stripe_customer_has_credit_card_as_default_payment_method(stripe_customer)
- )
+ stripe_customer = self.add_card_and_upgrade(user)
+
+ self.assertEqual(PaymentIntent.objects.count(), 0)
self.assertEqual(stripe_customer.description, "zulip (Zulip Dev)")
self.assertEqual(stripe_customer.discount, None)
self.assertEqual(stripe_customer.email, user.delivery_email)
@@ -1231,26 +1258,8 @@ class StripeTest(StripeTestCase):
self.assertNotEqual(user.realm.plan_type, Realm.PLAN_TYPE_STANDARD)
self.assertFalse(Customer.objects.filter(realm=user.realm).exists())
- with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- response = self.upgrade(onboarding=True)
+ stripe_customer = self.add_card_and_upgrade(user, onboarding=True)
self.assertEqual(PaymentIntent.objects.all().count(), 0)
-
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "free_trial_upgrade_from_onboarding_page",
- "status": "completed",
- "event_handler": {"status": "succeeded"},
- },
- )
-
- stripe_customer = stripe_get_customer(
- assert_is_not_none(Customer.objects.get(realm=user.realm).stripe_customer_id)
- )
- self.assertTrue(
- stripe_customer_has_credit_card_as_default_payment_method(stripe_customer)
- )
self.assertEqual(stripe_customer.description, "zulip (Zulip Dev)")
self.assertEqual(stripe_customer.discount, None)
self.assertEqual(stripe_customer.email, user.delivery_email)
@@ -1448,7 +1457,8 @@ class StripeTest(StripeTestCase):
new_seat_count = 23
# Change the seat count while the user is going through the upgrade flow
with patch("corporate.lib.stripe.get_latest_seat_count", return_value=new_seat_count):
- self.upgrade()
+ self.add_card_and_upgrade(hamlet)
+
customer = Customer.objects.first()
assert customer is not None
stripe_customer_id: str = assert_is_not_none(customer.stripe_customer_id)
@@ -1467,307 +1477,6 @@ class StripeTest(StripeTestCase):
self.assertEqual(ledger_entry.licenses, new_seat_count)
self.assertEqual(ledger_entry.licenses_at_next_renewal, new_seat_count)
- @mock_stripe()
- def test_upgrade_first_card_fails_and_retry_with_another_card_without_starting_from_beginning(
- self, *mocks: Mock
- ) -> None:
- user = self.example_user("hamlet")
- self.login_user(user)
- # From https://stripe.com/docs/testing#cards: Attaching this card to
- # a Customer object succeeds, but attempts to charge the customer fail.
- with self.assertLogs("corporate.stripe", "INFO") as m:
- response = self.upgrade(
- payment_method=self.get_test_card_string(
- attaches_to_customer=True, charge_succeeds=False
- )
- )
- self.assertEqual(
- m.output,
- [
- "INFO:corporate.stripe:Stripe payment intent failed: zulip card_error card_declined None"
- ],
- )
-
- [payment_intent] = PaymentIntent.objects.all()
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- "event_handler": {
- "status": "succeeded",
- },
- },
- )
- self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- payment_intent.stripe_payment_intent_id,
- {
- "status": "requires_payment_method",
- "last_payment_error": {
- "message": "Your card was declined.",
- "description": "card_error",
- },
- "event_handler": {"status": "succeeded"},
- },
- )
- # Check that we created a Customer object but no CustomerPlan
- stripe_customer_id = Customer.objects.get(realm=get_realm("zulip")).stripe_customer_id
- assert stripe_customer_id is not None
- self.assertFalse(CustomerPlan.objects.exists())
- # Check that we created a Customer in stripe, a failed Charge, and no Invoices or Invoice Items
- self.assertTrue(stripe_get_customer(stripe_customer_id))
- [charge] = iter(stripe.Charge.list(customer=stripe_customer_id))
- self.assertEqual(charge.failure_code, "card_declined")
- self.assertFalse(stripe.Invoice.list(customer=stripe_customer_id))
- self.assertFalse(stripe.InvoiceItem.list(customer=stripe_customer_id))
- # Check that we correctly populated RealmAuditLog
- audit_log_entries = list(
- RealmAuditLog.objects.filter(acting_user=user)
- .values_list("event_type", flat=True)
- .order_by("id")
- )
- self.assertEqual(
- audit_log_entries,
- [RealmAuditLog.STRIPE_CUSTOMER_CREATED, RealmAuditLog.STRIPE_CARD_CHANGED],
- )
- # Check that we did not update Realm
- realm = get_realm("zulip")
- self.assertNotEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD)
- # Check that we still get redirected to /upgrade
- response = self.client_get("/billing/")
- self.assertEqual(response.status_code, 302)
- self.assertEqual("/upgrade/", response["Location"])
-
- [last_event] = iter(stripe.Event.list(limit=1))
- retry_payment_intent_json_response = self.client_post(
- "/json/billing/session/start_retry_payment_intent_session",
- {
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- },
- )
- self.assert_json_success(retry_payment_intent_json_response)
- [payment_intent] = PaymentIntent.objects.all()
- response_dict = self.assert_json_success(retry_payment_intent_json_response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "retry_upgrade_with_another_payment_method",
- "status": "created",
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- },
- )
- self.trigger_stripe_checkout_session_completed_webhook(
- self.get_test_card_string(
- attaches_to_customer=True, charge_succeeds=True, card_provider="visa"
- )
- )
- self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- payment_intent.stripe_payment_intent_id,
- {"status": "processing"},
- )
- self.send_stripe_webhook_events(last_event)
-
- response_dict = self.assert_json_success(retry_payment_intent_json_response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "retry_upgrade_with_another_payment_method",
- "status": "completed",
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- "event_handler": {
- "status": "succeeded",
- },
- },
- )
- self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- payment_intent.stripe_payment_intent_id,
- {"status": "succeeded", "event_handler": {"status": "succeeded"}},
- )
-
- retry_payment_intent_json_response = self.client_post(
- "/json/billing/session/start_retry_payment_intent_session",
- {
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- },
- )
- self.assert_json_error(retry_payment_intent_json_response, "Payment already succeeded.")
-
- customer = Customer.objects.get(realm=get_realm("zulip"))
- # It's impossible to create two Customers, but check that we didn't
- # change stripe_customer_id
- self.assertEqual(customer.stripe_customer_id, stripe_customer_id)
- # Check that we successfully added a CustomerPlan, and have the right number of licenses
- plan = CustomerPlan.objects.get(customer=customer)
- ledger_entry = LicenseLedger.objects.get(plan=plan)
- self.assertEqual(ledger_entry.licenses, self.seat_count)
- self.assertEqual(ledger_entry.licenses_at_next_renewal, self.seat_count)
- # Check the Charges and Invoices in Stripe
- [charge0, charge1] = iter(stripe.Charge.list(customer=stripe_customer_id))
- self.assertEqual(8000 * self.seat_count, charge0.amount)
- [stripe_invoice] = iter(stripe.Invoice.list(customer=stripe_customer_id))
- self.assertEqual(
- [8000 * self.seat_count, -8000 * self.seat_count],
- [item.amount for item in stripe_invoice.lines],
- )
- # Check that we correctly populated RealmAuditLog
- audit_log_entries = list(
- RealmAuditLog.objects.filter(acting_user=user)
- .values_list("event_type", flat=True)
- .order_by("id")
- )
- self.assertEqual(
- audit_log_entries,
- [
- RealmAuditLog.STRIPE_CUSTOMER_CREATED,
- RealmAuditLog.STRIPE_CARD_CHANGED,
- RealmAuditLog.STRIPE_CARD_CHANGED,
- RealmAuditLog.CUSTOMER_PLAN_CREATED,
- RealmAuditLog.REALM_PLAN_TYPE_CHANGED,
- ],
- )
- # Check that we correctly updated Realm
- realm = get_realm("zulip")
- self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD)
- # Check that we can no longer access /upgrade
- response = self.client_get("/upgrade/")
- self.assertEqual(response.status_code, 302)
- self.assertEqual("/billing/", response["Location"])
-
- @mock_stripe()
- def test_upgrade_first_card_fails_and_restart_from_beginning(self, *mocks: Mock) -> None:
- user = self.example_user("hamlet")
- self.login_user(user)
- # From https://stripe.com/docs/testing#cards: Attaching this card to
- # a Customer object succeeds, but attempts to charge the customer fail.
- with self.assertLogs("corporate.stripe", "INFO") as m:
- response = self.upgrade(
- payment_method=self.get_test_card_string(
- attaches_to_customer=True, charge_succeeds=False
- )
- )
- self.assertEqual(
- m.output,
- [
- "INFO:corporate.stripe:Stripe payment intent failed: zulip card_error card_declined None"
- ],
- )
-
- [payment_intent] = PaymentIntent.objects.all()
- assert payment_intent.stripe_payment_intent_id is not None
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- "event_handler": {
- "status": "succeeded",
- },
- },
- )
- self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- payment_intent.stripe_payment_intent_id,
- {
- "status": "requires_payment_method",
- "last_payment_error": {
- "message": "Your card was declined.",
- "description": "card_error",
- },
- "event_handler": {"status": "succeeded"},
- },
- )
-
- # Check that we created a Customer object but no CustomerPlan
- stripe_customer_id = Customer.objects.get(realm=get_realm("zulip")).stripe_customer_id
- assert stripe_customer_id is not None
- self.assertFalse(CustomerPlan.objects.exists())
- # Check that we created a Customer in stripe, a failed Charge, and no Invoices or Invoice Items
- self.assertTrue(stripe_get_customer(stripe_customer_id))
- [charge] = iter(stripe.Charge.list(customer=stripe_customer_id))
- self.assertEqual(charge.failure_code, "card_declined")
- # TODO: figure out what these actually are
- self.assertFalse(stripe.Invoice.list(customer=stripe_customer_id))
- self.assertFalse(stripe.InvoiceItem.list(customer=stripe_customer_id))
- # Check that we correctly populated RealmAuditLog
- audit_log_entries = list(
- RealmAuditLog.objects.filter(acting_user=user)
- .values_list("event_type", flat=True)
- .order_by("id")
- )
- self.assertEqual(
- audit_log_entries,
- [RealmAuditLog.STRIPE_CUSTOMER_CREATED, RealmAuditLog.STRIPE_CARD_CHANGED],
- )
- # Check that we did not update Realm
- realm = get_realm("zulip")
- self.assertNotEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD)
- # Check that we still get redirected to /upgrade
- response = self.client_get("/billing/")
- self.assertEqual(response.status_code, 302)
- self.assertEqual("/upgrade/", response["Location"])
-
- # Try again, with a valid card, after they added a few users
- with patch("corporate.lib.stripe.get_latest_seat_count", return_value=23):
- response = self.upgrade()
- [second_payment_intent, _] = PaymentIntent.objects.all().order_by("-id")
- assert second_payment_intent.stripe_payment_intent_id is not None
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": second_payment_intent.stripe_payment_intent_id,
- "event_handler": {
- "status": "succeeded",
- },
- },
- )
- self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- second_payment_intent.stripe_payment_intent_id,
- {"status": "succeeded", "event_handler": {"status": "succeeded"}},
- )
- customer = Customer.objects.get(realm=get_realm("zulip"))
- # It's impossible to create two Customers, but check that we didn't
- # change stripe_customer_id
- self.assertEqual(customer.stripe_customer_id, stripe_customer_id)
- # Check that we successfully added a CustomerPlan, and have the right number of licenses
- plan = CustomerPlan.objects.get(customer=customer)
- ledger_entry = LicenseLedger.objects.get(plan=plan)
- self.assertEqual(ledger_entry.licenses, 23)
- self.assertEqual(ledger_entry.licenses_at_next_renewal, 23)
- # Check the Charges and Invoices in Stripe
- [charge0, charge1] = iter(stripe.Charge.list(customer=stripe_customer_id))
- self.assertEqual(8000 * 23, charge0.amount)
- [stripe_invoice] = iter(stripe.Invoice.list(customer=stripe_customer_id))
- self.assertEqual([8000 * 23, -8000 * 23], [item.amount for item in stripe_invoice.lines])
- # Check that we correctly populated RealmAuditLog
- audit_log_entries = list(
- RealmAuditLog.objects.filter(acting_user=user)
- .values_list("event_type", flat=True)
- .order_by("id")
- )
- self.assertEqual(
- audit_log_entries,
- [
- RealmAuditLog.STRIPE_CUSTOMER_CREATED,
- RealmAuditLog.STRIPE_CARD_CHANGED,
- RealmAuditLog.STRIPE_CARD_CHANGED,
- RealmAuditLog.CUSTOMER_PLAN_CREATED,
- RealmAuditLog.REALM_PLAN_TYPE_CHANGED,
- ],
- )
- # Check that we correctly updated Realm
- realm = get_realm("zulip")
- self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD)
- # Check that we can no longer access /upgrade
- response = self.client_get("/upgrade/")
- self.assertEqual(response.status_code, 302)
- self.assertEqual("/billing/", response["Location"])
-
def test_upgrade_with_tampered_seat_count(self) -> None:
hamlet = self.example_user("hamlet")
self.login_user(hamlet)
@@ -1783,6 +1492,7 @@ class StripeTest(StripeTestCase):
self.login_user(hamlet)
hamlet_upgrade_page_response = self.client_get("/upgrade/")
+ self.add_card_to_customer_for_upgrade()
self.client_post(
"/json/billing/upgrade",
{
@@ -1795,64 +1505,19 @@ class StripeTest(StripeTestCase):
"license_management": "automatic",
},
)
- [hamlet_stripe_session] = iter(stripe.checkout.Session.list(limit=1))
+ # Hamlet already paid to upgrade the org but we haven't received a success event for it yet.
+ [hamlet_payment_success_event] = iter(
+ stripe.Event.list(type="payment_intent.succeeded", limit=1)
+ )
[hamlet_payment_intent] = iter(stripe.PaymentIntent.list(limit=1))
self.login_user(othello)
+ # Othello completed the upgrade while we were waiting on success payment event for Hamlet.
self.upgrade()
- self.login_user(hamlet)
- # Checkout session cannot be started since the organization has been already upgraded.
with self.assertLogs("corporate.stripe", "WARNING"):
- response = self.client_post(
- "/json/billing/upgrade",
- {
- "billing_modality": "charge_automatically",
- "schedule": "annual",
- "signed_seat_count": self.get_signed_seat_count_from_response(
- hamlet_upgrade_page_response
- ),
- "salt": self.get_salt_from_response(hamlet_upgrade_page_response),
- "license_management": "automatic",
- },
- )
- self.assert_json_error_contains(
- response,
- "The organization is already subscribed to a plan. Please reload the billing page.",
- )
- payment_method = self.get_test_card_string(
- attaches_to_customer=True, charge_succeeds=True, card_provider="visa"
- )
-
- # Organization has been upgraded by the time hamlet completes the checkout session.
- with self.assertLogs("corporate.stripe", "WARNING"):
- self.trigger_stripe_checkout_session_completed_webhook(
- payment_method, hamlet_stripe_session
- )
- self.assert_details_of_valid_session_from_event_status_endpoint(
- hamlet_stripe_session.id,
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": hamlet_payment_intent.id,
- "event_handler": {
- "status": "failed",
- "error": {
- "message": "The organization is already subscribed to a plan. Please reload the billing page.",
- "description": "subscribing with existing subscription",
- },
- },
- },
- )
+ self.send_stripe_webhook_event(hamlet_payment_success_event)
- # Organization has been upgraded by the time payment intent is successful.
- stripe.PaymentIntent.confirm(
- hamlet_payment_intent.id,
- payment_method=payment_method,
- off_session=True,
- )
- with self.assertLogs("corporate.stripe", "WARNING"):
- self.send_last_stripe_webhook_event()
self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
hamlet_payment_intent.id,
{
@@ -1891,7 +1556,8 @@ class StripeTest(StripeTestCase):
)
self.assert_length(m.output, 1)
- def test_check_upgrade_parameters(self) -> None:
+ @mock_stripe(tested_timestamp_fields=["created"])
+ def test_check_upgrade_parameters(self, *mocks: Mock) -> None:
# Tests all the error paths except 'not enough licenses'
def check_error(
error_message: str,
@@ -1899,6 +1565,7 @@ class StripeTest(StripeTestCase):
upgrade_params: Mapping[str, Any],
del_args: Sequence[str] = [],
) -> None:
+ self.add_card_to_customer_for_upgrade()
if error_description:
with self.assertLogs("corporate.stripe", "WARNING"):
response = self.upgrade(
@@ -1954,7 +1621,12 @@ class StripeTest(StripeTestCase):
},
)
- def test_upgrade_license_counts(self) -> None:
+ @mock_stripe(tested_timestamp_fields=["created"])
+ def test_upgrade_license_counts(self, *mocks: Mock) -> None:
+ hamlet = self.example_user("hamlet")
+ self.login_user(hamlet)
+ self.add_card_to_customer_for_upgrade()
+
def check_min_licenses_error(
invoice: bool,
licenses: Optional[int],
@@ -1996,20 +1668,15 @@ class StripeTest(StripeTestCase):
del_args = []
upgrade_params["licenses"] = licenses
with patch("corporate.lib.stripe.BillingSession.process_initial_upgrade"):
- stripe_session = stripe.checkout.Session()
- stripe_session.id = "stripe_session_id"
- stripe_session.url = "stripe_session_url"
with patch(
- "corporate.lib.stripe.BillingSession.setup_upgrade_checkout_session_and_payment_intent",
- return_value=stripe_session,
+ "corporate.lib.stripe.BillingSession.create_stripe_payment_intent",
+ return_value="fake_payment_intent_id",
):
response = self.upgrade(
invoice=invoice, talk_to_stripe=False, del_args=del_args, **upgrade_params
)
self.assert_json_success(response)
- hamlet = self.example_user("hamlet")
- self.login_user(hamlet)
# Autopay with licenses < seat count
check_min_licenses_error(
False, self.seat_count - 1, self.seat_count, {"license_management": "manual"}
@@ -2051,11 +1718,13 @@ class StripeTest(StripeTestCase):
customer.save()
check_success(False, self.seat_count - 1, {"license_management": "manual"})
- def test_upgrade_with_uncaught_exception(self) -> None:
+ @mock_stripe(tested_timestamp_fields=["created"])
+ def test_upgrade_with_uncaught_exception(self, *mock_args: Any) -> None:
hamlet = self.example_user("hamlet")
self.login_user(hamlet)
+ self.add_card_to_customer_for_upgrade()
with patch(
- "corporate.lib.stripe.BillingSession.setup_upgrade_checkout_session_and_payment_intent",
+ "corporate.lib.stripe.BillingSession.create_stripe_payment_intent",
side_effect=Exception,
), self.assertLogs("corporate.stripe", "WARNING") as m:
response = self.upgrade(talk_to_stripe=False)
@@ -2068,60 +1737,21 @@ class StripeTest(StripeTestCase):
orjson.loads(response.content)["error_description"], "uncaught exception during upgrade"
)
- @mock_stripe()
- def test_checkout_session_completed_with_uncaught_exception(self, *mock_args: Any) -> None:
- hamlet = self.example_user("hamlet")
- self.login_user(hamlet)
-
- with patch(
- "corporate.lib.stripe_event_handler.RealmBillingSession",
- side_effect=Exception,
- ), self.assertLogs("corporate.stripe", "WARNING"):
- response = self.upgrade()
-
- response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": PaymentIntent.objects.get().stripe_payment_intent_id,
- "event_handler": {
- "status": "failed",
- "error": {
- "message": "Something went wrong. Please contact [email protected].",
- "description": "uncaught exception in checkout.session.completed event handler",
- },
- },
- },
- )
-
- @mock_stripe()
+ @mock_stripe(tested_timestamp_fields=["created"])
def test_payment_intent_succeeded_event_with_uncaught_exception(self, *mock_args: Any) -> None:
hamlet = self.example_user("hamlet")
self.login_user(hamlet)
+ self.add_card_to_customer_for_upgrade()
with patch(
"corporate.lib.stripe.BillingSession.process_initial_upgrade", side_effect=Exception
), self.assertLogs("corporate.stripe", "WARNING"):
response = self.upgrade()
- [payment_intent] = PaymentIntent.objects.all().order_by("-id")
response_dict = self.assert_json_success(response)
- self.assert_details_of_valid_session_from_event_status_endpoint(
- response_dict["stripe_session_id"],
- {
- "type": "upgrade_from_billing_page",
- "status": "completed",
- "stripe_payment_intent_id": payment_intent.stripe_payment_intent_id,
- "event_handler": {
- "status": "succeeded",
- },
- },
- )
self.assert_details_of_valid_payment_intent_from_event_status_endpoint(
- payment_intent.stripe_payment_intent_id,
+ response_dict["stripe_payment_intent_id"],
{
"status": "succeeded",
"event_handler": {
@@ -2134,39 +1764,6 @@ class StripeTest(StripeTestCase):
},
)
- @mock_stripe()
- def test_restart_payment_intent_session_errors(self, *mocks: Any) -> None:
- user = self.example_user("hamlet")
- self.login_user(user)
-
- json_response = self.client_post("/json/billing/session/start_retry_payment_intent_session")
- self.assert_json_error(json_response, "Missing 'stripe_payment_intent_id' argument")
-
- json_response = self.client_post(
- "/json/billing/session/start_retry_payment_intent_session",
- {"stripe_payment_intent_id": "stripe_payment_intent_id"},
- )
- self.assert_json_error(json_response, "Please create a customer first.")
-
- upgrade_page_response = self.client_get("/upgrade/")
- self.client_post(
- "/json/billing/upgrade",
- {
- "billing_modality": "charge_automatically",
- "schedule": "monthly",
- "signed_seat_count": self.get_signed_seat_count_from_response(
- upgrade_page_response
- ),
- "salt": self.get_salt_from_response(upgrade_page_response),
- "license_management": "automatic",
- },
- )
- response = self.client_post(
- "/json/billing/session/start_retry_payment_intent_session",
- {"stripe_payment_intent_id": "stripe_payment_intent_id"},
- )
- self.assert_json_error(response, "Invalid payment intent id.")
-
def test_request_sponsorship_form_with_invalid_url(self) -> None:
user = self.example_user("hamlet")
self.login_user(user)
@@ -2392,30 +1989,35 @@ class StripeTest(StripeTestCase):
self.assertEqual(response.status_code, 302)
self.assertEqual(response["Location"], "/sponsorship/")
- user.realm.plan_type = Realm.PLAN_TYPE_LIMITED
- user.realm.save()
- customer = Customer.objects.create(realm=user.realm, stripe_customer_id="cus_123")
- response = self.client_get("/upgrade/")
- self.assertEqual(response.status_code, 200)
-
- CustomerPlan.objects.create(
- customer=customer,
- billing_cycle_anchor=timezone_now(),
- billing_schedule=CustomerPlan.ANNUAL,
- tier=CustomerPlan.STANDARD,
- )
- response = self.client_get("/upgrade/")
- self.assertEqual(response.status_code, 302)
- self.assertEqual(response["Location"], "/billing/")
+ # Avoid contacting stripe as we only want to check redirects here.
+ with patch(
+ "corporate.lib.stripe.customer_has_credit_card_as_default_payment_method",
+ return_value=False,
+ ):
+ user.realm.plan_type = Realm.PLAN_TYPE_LIMITED
+ user.realm.save()
+ customer = Customer.objects.create(realm=user.realm, stripe_customer_id="cus_123")
+ response = self.client_get("/upgrade/")
+ self.assertEqual(response.status_code, 200)
- with self.settings(FREE_TRIAL_DAYS=30):
+ CustomerPlan.objects.create(
+ customer=customer,
+ billing_cycle_anchor=timezone_now(),
+ billing_schedule=CustomerPlan.ANNUAL,
+ tier=CustomerPlan.STANDARD,
+ )
response = self.client_get("/upgrade/")
self.assertEqual(response.status_code, 302)
self.assertEqual(response["Location"], "/billing/")
- response = self.client_get("/upgrade/", {"onboarding": "true"})
- self.assertEqual(response.status_code, 302)
- self.assertEqual(response["Location"], "/billing/?onboarding=true")
+ with self.settings(FREE_TRIAL_DAYS=30):
+ response = self.client_get("/upgrade/")
+ self.assertEqual(response.status_code, 302)
+ self.assertEqual(response["Location"], "/billing/")
+
+ response = self.client_get("/upgrade/", {"onboarding": "true"})
+ self.assertEqual(response.status_code, 302)
+ self.assertEqual(response["Location"], "/billing/?onboarding=true")
def test_get_latest_seat_count(self) -> None:
realm = get_realm("zulip")
@@ -2503,7 +2105,7 @@ class StripeTest(StripeTestCase):
def test_replace_payment_method(self, *mocks: Mock) -> None:
user = self.example_user("hamlet")
self.login_user(user)
- self.upgrade()
+ self.add_card_and_upgrade(user)
# Create an open invoice
customer = Customer.objects.first()
assert customer is not None
@@ -2729,8 +2331,7 @@ class StripeTest(StripeTestCase):
user = self.example_user("hamlet")
self.login_user(user)
- with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- self.upgrade(schedule="monthly")
+ self.add_card_and_upgrade(user, schedule="monthly")
monthly_plan = get_current_plan_by_realm(user.realm)
assert monthly_plan is not None
self.assertEqual(monthly_plan.automanage_licenses, True)
@@ -2919,8 +2520,9 @@ class StripeTest(StripeTestCase):
num_licenses = 35
self.login_user(user)
- with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- self.upgrade(schedule="monthly", license_management="manual", licenses=num_licenses)
+ self.add_card_and_upgrade(
+ user, schedule="monthly", license_management="manual", licenses=num_licenses
+ )
monthly_plan = get_current_plan_by_realm(user.realm)
assert monthly_plan is not None
self.assertEqual(monthly_plan.automanage_licenses, False)
@@ -3095,7 +2697,7 @@ class StripeTest(StripeTestCase):
free_trial_end_date = self.now + timedelta(days=60)
with self.settings(FREE_TRIAL_DAYS=60):
with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- self.local_upgrade(self.seat_count, True, CustomerPlan.ANNUAL, True, True)
+ self.local_upgrade(self.seat_count, True, CustomerPlan.ANNUAL, False, True)
plan = CustomerPlan.objects.get()
self.assertEqual(plan.next_invoice_date, free_trial_end_date)
@@ -3849,7 +3451,7 @@ class StripeTest(StripeTestCase):
self.assertFalse(customer_has_credit_card_as_default_payment_method(customer))
self.login_user(iago)
- self.upgrade()
+ self.add_card_and_upgrade(iago)
self.assertTrue(customer_has_credit_card_as_default_payment_method(customer))
@@ -3880,6 +3482,7 @@ class StripeWebhookEndpointTest(ZulipTestCase):
self.assertEqual(error_log.output, [f"ERROR:corporate.stripe:{expected_error_message}"])
def test_stripe_webhook_for_session_completed_event(self) -> None:
+ # We don't process sessions for which we don't have a `Session` entry.
valid_session_event_data = {
"id": "stripe_event_id",
"api_version": STRIPE_API_VERSION,
@@ -3896,92 +3499,56 @@ class StripeWebhookEndpointTest(ZulipTestCase):
self.assertEqual(result.status_code, 200)
m.assert_not_called()
+ def test_stripe_webhook_for_payment_intent_events(self) -> None:
customer = Customer.objects.create(realm=get_realm("zulip"))
- Session.objects.create(
- stripe_session_id="stripe_session_id",
+
+ stripe_event_id = "stripe_event_id"
+ stripe_payment_intent_id = "stripe_payment_intent_id"
+ valid_session_event_data = {
+ "id": stripe_event_id,
+ "type": "payment_intent.succeeded",
+ "api_version": STRIPE_API_VERSION,
+ "data": {"object": {"object": "payment_intent", "id": stripe_payment_intent_id}},
+ }
+
+ with patch("corporate.views.webhook.handle_payment_intent_succeeded_event") as m:
+ result = self.client_post(
+ "/stripe/webhook/",
+ valid_session_event_data,
+ content_type="application/json",
+ )
+ self.assert_length(Event.objects.filter(stripe_event_id=stripe_event_id), 0)
+ self.assertEqual(result.status_code, 200)
+ m.assert_not_called()
+
+ PaymentIntent.objects.create(
+ stripe_payment_intent_id=stripe_payment_intent_id,
customer=customer,
- type=Session.UPGRADE_FROM_BILLING_PAGE,
+ status=PaymentIntent.REQUIRES_PAYMENT_METHOD,
)
- self.assert_length(Event.objects.all(), 0)
- with patch("corporate.views.webhook.handle_checkout_session_completed_event") as m:
+ self.assert_length(Event.objects.filter(stripe_event_id=stripe_event_id), 0)
+ with patch("corporate.views.webhook.handle_payment_intent_succeeded_event") as m:
result = self.client_post(
"/stripe/webhook/",
valid_session_event_data,
content_type="application/json",
)
- [event] = Event.objects.all()
+ [event] = Event.objects.filter(stripe_event_id=stripe_event_id)
self.assertEqual(result.status_code, 200)
strip_event = stripe.Event.construct_from(valid_session_event_data, stripe.api_key)
m.assert_called_once_with(strip_event.data.object, event)
- with patch("corporate.views.webhook.handle_checkout_session_completed_event") as m:
+ with patch("corporate.views.webhook.handle_payment_intent_succeeded_event") as m:
result = self.client_post(
"/stripe/webhook/",
valid_session_event_data,
content_type="application/json",
)
- self.assert_length(Event.objects.all(), 1)
+ self.assert_length(Event.objects.filter(stripe_event_id=stripe_event_id), 1)
self.assertEqual(result.status_code, 200)
m.assert_not_called()
- def test_stripe_webhook_for_payment_intent_events(self) -> None:
- customer = Customer.objects.create(realm=get_realm("zulip"))
-
- for index, event_type in enumerate(
- ["payment_intent.succeeded", "payment_intent.payment_failed"]
- ):
- handler_function_name = "handle_" + event_type.replace(".", "_") + "_event"
- handler_function_path = f"corporate.views.webhook.{handler_function_name}"
-
- stripe_event_id = f"stripe_event_id_{index}"
- stripe_payment_intent_id = f"stripe_payment_intent_id{index}"
-
- valid_session_event_data = {
- "id": stripe_event_id,
- "type": event_type,
- "api_version": STRIPE_API_VERSION,
- "data": {"object": {"object": "payment_intent", "id": stripe_payment_intent_id}},
- }
-
- with patch(handler_function_path) as m:
- result = self.client_post(
- "/stripe/webhook/",
- valid_session_event_data,
- content_type="application/json",
- )
- self.assert_length(Event.objects.filter(stripe_event_id=stripe_event_id), 0)
- self.assertEqual(result.status_code, 200)
- m.assert_not_called()
-
- PaymentIntent.objects.create(
- stripe_payment_intent_id=stripe_payment_intent_id,
- customer=customer,
- status=PaymentIntent.REQUIRES_PAYMENT_METHOD,
- )
-
- self.assert_length(Event.objects.filter(stripe_event_id=stripe_event_id), 0)
- with patch(handler_function_path) as m:
- result = self.client_post(
- "/stripe/webhook/",
- valid_session_event_data,
- content_type="application/json",
- )
- [event] = Event.objects.filter(stripe_event_id=stripe_event_id)
- self.assertEqual(result.status_code, 200)
- strip_event = stripe.Event.construct_from(valid_session_event_data, stripe.api_key)
- m.assert_called_once_with(strip_event.data.object, event)
-
- with patch(handler_function_path) as m:
- result = self.client_post(
- "/stripe/webhook/",
- valid_session_event_data,
- content_type="application/json",
- )
- self.assert_length(Event.objects.filter(stripe_event_id=stripe_event_id), 1)
- self.assertEqual(result.status_code, 200)
- m.assert_not_called()
-
class EventStatusTest(StripeTestCase):
def test_event_status_json_endpoint_errors(self) -> None:
@@ -4103,7 +3670,7 @@ class RequiresBillingAccessTest(StripeTestCase):
check_users_cant_access(
[guest],
"Must be an organization member",
- "/json/billing/session/start_retry_payment_intent_session",
+ "/json/upgrade/session/start_card_update_session",
"POST",
{},
)
@@ -4134,16 +3701,22 @@ class RequiresBillingAccessTest(StripeTestCase):
response = self.client_get("/upgrade/", follow=True)
self.assertEqual(response.status_code, 404)
- # Check that non-admins can access /upgrade/ via /billing, when there is no Customer object
- self.login_user(self.example_user("hamlet"))
+ non_owner_non_billing_admin = self.example_user("othello")
+ self.login_user(non_owner_non_billing_admin)
response = self.client_get("/billing/")
- self.assertEqual(response.status_code, 302)
- self.assertEqual("/upgrade/", response["Location"])
+ self.assert_in_success_response(
+ ["You must be an organization owner or a billing administrator to view this page."],
+ response,
+ )
# Check that non-admins can sign up and pay
- self.upgrade()
- # Check that the non-admin hamlet can still access /billing
+ self.add_card_and_upgrade(non_owner_non_billing_admin)
+ # Check that the non-admin othello can still access /billing
response = self.client_get("/billing/")
self.assert_in_success_response(["Zulip Cloud Standard"], response)
+ self.assert_not_in_success_response(
+ ["You must be an organization owner or a billing administrator to view this page."],
+ response,
+ )
# Check realm owners can access billing, even though they are not a billing admin
desdemona = self.example_user("desdemona")
@@ -4722,7 +4295,7 @@ class InvoiceTest(StripeTestCase):
user = self.example_user("hamlet")
self.login_user(user)
with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- self.upgrade()
+ self.add_card_and_upgrade(user)
# Increase
with patch("corporate.lib.stripe.get_latest_seat_count", return_value=self.seat_count + 3):
update_license_ledger_if_needed(get_realm("zulip"), self.now + timedelta(days=100))
@@ -4741,9 +4314,9 @@ class InvoiceTest(StripeTestCase):
plan = CustomerPlan.objects.first()
assert plan is not None
invoice_plan(plan, self.now + timedelta(days=400))
- stripe_cutomer_id = plan.customer.stripe_customer_id
- assert stripe_cutomer_id is not None
- [invoice0, invoice1] = iter(stripe.Invoice.list(customer=stripe_cutomer_id))
+ stripe_customer_id = plan.customer.stripe_customer_id
+ assert stripe_customer_id is not None
+ [invoice0, invoice1] = iter(stripe.Invoice.list(customer=stripe_customer_id))
self.assertIsNotNone(invoice0.status_transitions.finalized_at)
[item0, item1, item2] = iter(invoice0.lines)
line_item_params = {
@@ -4982,7 +4555,7 @@ class TestSupportBillingHelpers(StripeTestCase):
# Check that the discount appears in page_params
self.assert_in_success_response(["85"], self.client_get("/upgrade/"))
# Check that the customer was charged the discounted amount
- self.upgrade()
+ self.add_card_and_upgrade(user)
customer = Customer.objects.first()
assert customer is not None
[charge] = iter(stripe.Charge.list(customer=customer.stripe_customer_id))
@@ -5002,7 +4575,9 @@ class TestSupportBillingHelpers(StripeTestCase):
plan.save(update_fields=["status"])
attach_discount_to_realm(user.realm, Decimal(25), acting_user=support_admin)
with patch("corporate.lib.stripe.timezone_now", return_value=self.now):
- self.upgrade(license_management="automatic", billing_modality="charge_automatically")
+ self.add_card_and_upgrade(
+ user, license_management="automatic", billing_modality="charge_automatically"
+ )
[charge, _] = iter(stripe.Charge.list(customer=customer.stripe_customer_id))
self.assertEqual(6000 * self.seat_count, charge.amount)
stripe_customer_id = customer.stripe_customer_id
diff --git a/corporate/urls.py b/corporate/urls.py
index 772e9805a89..310d9d80888 100644
--- a/corporate/urls.py
+++ b/corporate/urls.py
@@ -17,7 +17,7 @@ from corporate.views.portico import (
)
from corporate.views.session import (
start_card_update_stripe_session,
- start_retry_payment_intent_session,
+ start_card_update_stripe_session_for_realm_upgrade,
)
from corporate.views.support import support_request
from corporate.views.upgrade import initial_upgrade, sponsorship, upgrade
@@ -45,8 +45,8 @@ v1_api_and_json_patterns = [
rest_path("billing/plan", PATCH=update_plan),
rest_path("billing/session/start_card_update_session", POST=start_card_update_stripe_session),
rest_path(
- "billing/session/start_retry_payment_intent_session",
- POST=start_retry_payment_intent_session,
+ "upgrade/session/start_card_update_session",
+ POST=start_card_update_stripe_session_for_realm_upgrade,
),
rest_path("billing/event/status", GET=event_status),
]
diff --git a/corporate/views/session.py b/corporate/views/session.py
index 0ca1d9acbd6..db4b4e8d552 100644
--- a/corporate/views/session.py
+++ b/corporate/views/session.py
@@ -1,15 +1,10 @@
import logging
-from typing import Any, Dict
-import stripe
from django.http import HttpRequest, HttpResponse
-from django.utils.translation import gettext as _
from corporate.lib.stripe import RealmBillingSession
-from corporate.models import PaymentIntent, Session
+from corporate.models import Session
from zerver.decorator import require_billing_access, require_organization_member
-from zerver.lib.exceptions import JsonableError
-from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.models import UserProfile
@@ -37,43 +32,21 @@ def start_card_update_stripe_session(request: HttpRequest, user: UserProfile) ->
@require_organization_member
-@has_request_variables
-def start_retry_payment_intent_session(
- request: HttpRequest, user: UserProfile, stripe_payment_intent_id: str = REQ()
+def start_card_update_stripe_session_for_realm_upgrade(
+ request: HttpRequest, user: UserProfile
) -> HttpResponse:
billing_session = RealmBillingSession(user)
- customer = billing_session.get_customer()
- if customer is None:
- raise JsonableError(_("Please create a customer first."))
-
- try:
- payment_intent = PaymentIntent.objects.get(
- stripe_payment_intent_id=stripe_payment_intent_id, customer=customer
- )
- except PaymentIntent.DoesNotExist:
- raise JsonableError(_("Invalid payment intent id."))
-
- stripe_payment_intent = stripe.PaymentIntent.retrieve(stripe_payment_intent_id)
-
- if stripe_payment_intent.status == "succeeded":
- raise JsonableError(_("Payment already succeeded."))
-
- if (
- stripe_payment_intent.status == "processing"
- ): # nocoverage: Hard to arrive at this state using card
- raise JsonableError(_("Payment processing."))
-
- metadata: Dict[str, Any] = {
+ metadata = {
+ "type": "card_update",
"user_id": user.id,
}
- metadata.update(stripe_payment_intent.metadata)
- stripe_session = billing_session.create_stripe_checkout_session(
- metadata, Session.RETRY_UPGRADE_WITH_ANOTHER_PAYMENT_METHOD, payment_intent
+ stripe_session = billing_session.create_stripe_update_card_for_realm_upgrade_session(
+ metadata, Session.CARD_UPDATE_FROM_UPGRADE_PAGE
)
return json_success(
request,
data={
- "stripe_session_id": stripe_session.id,
"stripe_session_url": stripe_session.url,
+ "stripe_session_id": stripe_session.id,
},
)
diff --git a/corporate/views/webhook.py b/corporate/views/webhook.py
index e0e8c966b2e..ba30b6608bb 100644
--- a/corporate/views/webhook.py
+++ b/corporate/views/webhook.py
@@ -11,7 +11,6 @@ from stripe.webhook import Webhook
from corporate.lib.stripe import STRIPE_API_VERSION
from corporate.lib.stripe_event_handler import (
handle_checkout_session_completed_event,
- handle_payment_intent_payment_failed_event,
handle_payment_intent_succeeded_event,
)
from corporate.models import Event, PaymentIntent, Session
@@ -52,7 +51,6 @@ def stripe_webhook(request: HttpRequest) -> HttpResponse:
if stripe_event.type not in [
"checkout.session.completed",
"payment_intent.succeeded",
- "payment_intent.payment_failed",
]:
return HttpResponse(status=200)
@@ -87,19 +85,7 @@ def stripe_webhook(request: HttpRequest) -> HttpResponse:
event.object_id = payment_intent.id
event.save()
handle_payment_intent_succeeded_event(stripe_payment_intent, event)
- elif stripe_event.type == "payment_intent.payment_failed":
- stripe_payment_intent = stripe_event.data.object
- try:
- assert isinstance(stripe_payment_intent, stripe.PaymentIntent)
- payment_intent = PaymentIntent.objects.get(
- stripe_payment_intent_id=stripe_payment_intent.id
- )
- except PaymentIntent.DoesNotExist:
- # PaymentIntent that was not manually created from the billing system.
- # Could be an Invoice getting paid which is not an event we are interested in.
- return HttpResponse(status=200)
- event.content_type = ContentType.objects.get_for_model(PaymentIntent)
- event.object_id = payment_intent.id
- event.save()
- handle_payment_intent_payment_failed_event(stripe_payment_intent, event)
+ # We don't need to process failed payments via webhooks since we directly charge users
+ # when they click on "Purchase" button and immediately provide feedback for failed payments.
+ # If the feedback is not immediate, our event_status handler checks for payment status and informs the user.
return HttpResponse(status=200)
diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html
index c26259238c8..82074790733 100644
--- a/templates/corporate/upgrade.html
+++ b/templates/corporate/upgrade.html
@@ -134,9 +134,34 @@
</p>
</div>
{% endif %}
+ {% if not is_demo_organization %}
+ <div {% if payment_method %} id="upgrade-payment-info"{% endif %}>
+ {% if payment_method %}
+ <div class="input-box upgrade-page-field no-validation" id="upgrade-payment-menthod-wrapper">
+ <label for="customer-payment-method-for-upgrade" class="inline-block label-title">Payment method</label>
+ <div id="customer-payment-method-for-upgrade" class="not-editable-realm-field">
+ {{ payment_method }}
+ </div>
+ </div>
+ {% endif %}
+ <div class="upgrade-add-card-container input-box upgrade-page-field">
+ <button id="upgrade-add-card-button" {% if payment_method %}class="update-card-button"{% endif %}>
+ <span id="upgrade-add-card-button-text">
+ {% if payment_method %}
+ Update card
+ {% else %}
+ Add card
+ {% endif %}
+ </span>
+ <object class="loader upgrade-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
+ </button>
+ </div>
+ <div id="upgrade-cardchange-error" class="alert alert-danger upgrade-page-error"></div>
+ </div>
+ {% endif %}
<!-- Disabled buttons do not fire any events, so we need a container div that isn't disabled for tippyjs to work -->
<div class="upgrade-button-container input-box upgrade-page-field" {% if is_demo_organization %}data-tippy-content="{% trans %}Convert demo organization before upgrading.{% endtrans %}"{% endif %}>
- <button id="org-upgrade-button{% if is_demo_organization %} permanent-disabled{% endif %}">
+ <button id="org-upgrade-button{% if is_demo_organization %} permanent-disabled{% endif %}" {% if not payment_method %}disabled{% endif %}>
<span id="org-upgrade-button-text">
{% if free_trial_days %}
Start {{ free_trial_days }} day free trial
diff --git a/web/src/billing/event_status.ts b/web/src/billing/event_status.ts
index 632136470a1..e335a7733dd 100644
--- a/web/src/billing/event_status.ts
+++ b/web/src/billing/event_status.ts
@@ -50,25 +50,16 @@ function handle_session_complete_event(session: StripeSession): void {
let message = "";
let redirect_to = "";
switch (session.type) {
- case "upgrade_from_billing_page":
- case "retry_upgrade_with_another_payment_method":
- message = "We have received your billing details. Attempting to create charge...";
- redirect_to = `/billing/event_status?stripe_payment_intent_id=${session.stripe_payment_intent_id!}`;
- break;
- case "free_trial_upgrade_from_billing_page":
- message =
- "Your free trial of Zulip Cloud Standard has been activated. You would be redirected to the billing page soon.";
- redirect_to = "/billing/";
- break;
- case "free_trial_upgrade_from_onboarding_page":
- message =
- "Your free trial of Zulip Cloud Standard has been activated. You would be redirected to the billing page soon.";
- redirect_to = "/billing?onboarding=true";
- break;
case "card_update_from_billing_page":
message =
"Your card has been updated. You would be redirected to the billing page soon.";
redirect_to = "/billing#payment-method";
+ break;
+ case "card_update_from_upgrade_page":
+ message =
+ "Your card has been updated. You would be redirected to the upgrade page soon.";
+ redirect_to = "/upgrade/";
+ break;
}
update_status_and_redirect(message, redirect_to);
}
diff --git a/web/src/billing/upgrade.ts b/web/src/billing/upgrade.ts
index 72a01a2f52f..185e33910b3 100644
--- a/web/src/billing/upgrade.ts
+++ b/web/src/billing/upgrade.ts
@@ -1,12 +1,24 @@
import $ from "jquery";
+import {z} from "zod";
+
+import {localstorage} from "../localstorage";
import * as helpers from "./helpers";
import type {Prices} from "./helpers";
import {page_params} from "./page_params";
-let selected_schedule = "monthly";
+const ls = localstorage();
+const ls_selected_schedule = ls.get("selected_schedule");
+let selected_schedule: string =
+ typeof ls_selected_schedule === "string" ? ls_selected_schedule : "monthly";
let current_license_count = page_params.seat_count;
+const upgrade_response_schema = z.object({
+ stripe_session_url: z.string().optional(),
+ stripe_payment_intent_id: z.string().optional(),
+ organization_upgrade_successful: z.boolean().optional(),
+});
+
export const initialize = (): void => {
$("#org-upgrade-button").on("click", (e) => {
e.preventDefault();
@@ -19,8 +31,16 @@ export const initialize = (): void => {
[],
"POST",
(response) => {
- const response_data = helpers.stripe_session_url_schema.parse(response);
- window.location.replace(response_data.stripe_session_url);
+ const response_data = upgrade_response_schema.parse(response);
+ if (response_data.stripe_session_url) {
+ window.location.replace(response_data.stripe_session_url);
+ } else if (response_data.stripe_payment_intent_id) {
+ window.location.replace(
+ `/billing/event_status?stripe_payment_intent_id=${response_data.stripe_payment_intent_id}`,
+ );
+ } else if (response_data.organization_upgrade_successful) {
+ window.location.replace("/billing");
+ }
},
() => {
$("#org-upgrade-button-text").show();
@@ -49,8 +69,10 @@ export const initialize = (): void => {
}
update_due_today(selected_schedule);
+ $("#payment-schedule-select").val(selected_schedule);
$<HTMLInputElement>("#payment-schedule-select").on("change", function () {
selected_schedule = this.value;
+ ls.set("selected_schedule", selected_schedule);
update_due_today(selected_schedule);
});
@@ -81,6 +103,26 @@ export const initialize = (): void => {
current_license_count = license_count;
update_due_today(selected_schedule);
});
+
+ $("#upgrade-add-card-button").on("click", (e) => {
+ $("#upgrade-add-card-button #upgrade-add-card-button-text").hide();
+ $("#upgrade-add-card-button .loader").show();
+ helpers.create_ajax_request(
+ "/json/upgrade/session/start_card_update_session",
+ "upgrade-cardchange",
+ [],
+ "POST",
+ (response) => {
+ const response_data = helpers.stripe_session_url_schema.parse(response);
+ window.location.replace(response_data.stripe_session_url);
+ },
+ () => {
+ $("#upgrade-add-card-button .loader").hide();
+ $("#upgrade-add-card-button #upgrade-add-card-button-text").show();
+ },
+ );
+ e.preventDefault();
+ });
};
$(() => {
diff --git a/web/styles/portico/billing.css b/web/styles/portico/billing.css
index d4717dffc34..ef52e1d61d5 100644
--- a/web/styles/portico/billing.css
+++ b/web/styles/portico/billing.css
@@ -489,13 +489,10 @@ input[name="licenses"] {
background-color: hsl(0deg 70% 40%);
}
-#org-upgrade-button,
-#upgrade-add-card-button {
+#org-upgrade-button {
margin: 0;
width: 100%;
-}
-#org-upgrade-button {
&:disabled,
.permanent-disabled {
color: hsl(0deg 0% 80%);
@@ -506,6 +503,7 @@ input[name="licenses"] {
}
}
+#upgrade-page-details #upgrade-add-card-button,
#billing-page-details .user-stripe-card-update .user-stripe-card-update-button {
margin: 0;
width: 150px;
@@ -557,3 +555,43 @@ input[name="licenses"] {
display: block;
text-align: center;
}
+
+.upgrade-page-success {
+ display: none;
+ padding: 8px 0;
+ width: 450px;
+ text-align: center;
+ margin: auto;
+}
+
+#upgrade-payment-info {
+ display: grid;
+ grid-template: auto auto 1fr / 1fr auto;
+ grid-template-areas:
+ "payment-info add-card"
+ "alert-message alert-message";
+ width: 450px;
+ margin: auto;
+ padding-bottom: 25px;
+}
+
+#upgrade-payment-info .alert {
+ grid-area: alert-message;
+}
+
+#upgrade-page-details #upgrade-payment-menthod-wrapper {
+ margin-left: 0;
+ grid-area: payment-info;
+ width: auto;
+}
+
+/* Used class twice to increase specificity */
+#upgrade-payment-info .upgrade-add-card-container.upgrade-add-card-container {
+ grid-area: add-card;
+ width: auto;
+ margin-right: 0;
+}
+
+#upgrade-page-details .upgrade-add-card-container {
+ text-align: left;
+}
diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css
index 26f0fa54395..9a7d14ccba5 100644
--- a/web/styles/portico/portico_signin.css
+++ b/web/styles/portico/portico_signin.css
@@ -478,7 +478,7 @@ html {
}
.alert {
- &:not(.alert-info, .billing-page-success) {
+ &:not(.alert-info, .billing-page-success, .upgrade-page-success) {
padding: 0;
margin-bottom: 5px;
font-weight: 600;
diff --git a/web/tests/event_status.test.js b/web/tests/event_status.test.js
deleted file mode 100644
index e6c7d5322c2..00000000000
--- a/web/tests/event_status.test.js
+++ /dev/null
@@ -1,352 +0,0 @@
-"use strict";
-
-const {strict: assert} = require("assert");
-
-const {set_global, zrequire, mock_esm} = require("./lib/namespace");
-const {run_test} = require("./lib/test");
-const $ = require("./lib/zjquery");
-
-const event_status = zrequire("billing/event_status");
-const helpers = mock_esm("../src/billing/helpers");
-
-run_test("initialize_retry_with_another_card_link_click_handler", ({override}) => {
- override(helpers, "create_ajax_request", (url, form_name, ignored_inputs, method, callback) => {
- assert.equal(url, "/json/billing/session/start_retry_payment_intent_session");
- assert.equal(form_name, "restartsession");
- assert.deepEqual(ignored_inputs, []);
- assert.equal(method, "POST");
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(new_location, "stripe_session_url");
- },
- },
- });
- callback({stripe_session_url: "stripe_session_url"});
- });
- override(helpers, "stripe_session_url_schema", {
- parse(obj) {
- return obj;
- },
- });
- event_status.initialize_retry_with_another_card_link_click_handler();
- const retry_click_handler = $("#retry-with-another-card-link").get_on_handler("click");
- retry_click_handler({preventDefault() {}});
-});
-
-run_test("check_status", async ({override}) => {
- $("#data").attr("data-stripe-session-id", "stripe_session_id");
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "created",
- type: "upgrade_from_billing_page",
- },
- };
- });
- let completed = await event_status.check_status();
- assert.ok(!completed);
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "upgrade_from_billing_page",
- event_handler: {
- status: "started",
- },
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(!completed);
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "upgrade_from_billing_page",
- stripe_payment_intent_id: "spid_1A",
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- set_global("setTimeout", (callback_func) => {
- callback_func();
- });
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(
- new_location,
- "/billing/event_status?stripe_payment_intent_id=spid_1A",
- );
- },
- },
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-success").text(),
- "We have received your billing details. Attempting to create charge...",
- );
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "retry_upgrade_with_another_payment_method",
- stripe_payment_intent_id: "spid_1B",
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(
- new_location,
- "/billing/event_status?stripe_payment_intent_id=spid_1B",
- );
- },
- },
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-success").text(),
- "We have received your billing details. Attempting to create charge...",
- );
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "free_trial_upgrade_from_billing_page",
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(new_location, "/billing/");
- },
- },
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-success").text(),
- "Your free trial of Zulip Cloud Standard has been activated. You would be redirected to the billing page soon.",
- );
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "free_trial_upgrade_from_onboarding_page",
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(new_location, "/billing?onboarding=true");
- },
- },
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-success").text(),
- "Your free trial of Zulip Cloud Standard has been activated. You would be redirected to the billing page soon.",
- );
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "card_update_from_billing_page",
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(new_location, "/billing#payment-method");
- },
- },
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-success").text(),
- "Your card has been updated. You would be redirected to the billing page soon.",
- );
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_session_id: "stripe_session_id"});
- return {
- session: {
- status: "completed",
- type: "card_update_from_billing_page",
- event_handler: {
- status: "failed",
- error: {
- message: "Something went wrong.",
- },
- },
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal($("#webhook-error").text(), "Something went wrong.");
-
- $("#data").attr("data-stripe-session-id", "");
- $("#data").attr("data-stripe-payment-intent-id", "stripe_payment_intent_id");
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_payment_intent_id: "stripe_payment_intent_id"});
- return {
- payment_intent: {
- status: "requires_payment_method",
- last_payment_error: {
- message: "Your Card was declined.",
- },
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-error").html(),
- 'Your Card was declined.<br>You can try adding <a id="retry-with-another-card-link"> another card or </a> or retry the upgrade.',
- );
- assert.ok($("#retry-with-another-card-link").get_on_handler("click"));
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_payment_intent_id: "stripe_payment_intent_id"});
- return {
- payment_intent: {
- status: "requires_payment_method",
- last_payment_error: {
- message: "Your Card was declined.",
- },
- event_handler: {
- status: "failed",
- error: {
- message: "Something went wrong.",
- },
- },
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal($("#webhook-error").text(), "Something went wrong.");
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_payment_intent_id: "stripe_payment_intent_id"});
- return {
- payment_intent: {
- status: "requires_payment_method",
- event_handler: {
- status: "started",
- },
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(!completed);
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_payment_intent_id: "stripe_payment_intent_id"});
- return {
- payment_intent: {
- status: "succeeded",
- event_handler: {
- status: "succeeded",
- },
- },
- };
- });
- set_global("window", {
- location: {
- replace(new_location) {
- assert.equal(new_location, "/billing/");
- },
- },
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal(
- $("#webhook-success").text(),
- "Charge created successfully. Your organization has been upgraded. Redirecting to billing page...",
- );
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_payment_intent_id: "stripe_payment_intent_id"});
- return {
- payment_intent: {
- status: "succeeded",
- event_handler: {
- status: "failed",
- error: {
- message: "Something went wrong.",
- },
- },
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(completed);
- assert.equal($("#webhook-error").text(), "Something went wrong.");
-
- override($, "get", async (url, data) => {
- assert.equal(url, "/json/billing/event/status");
- assert.deepEqual(data, {stripe_payment_intent_id: "stripe_payment_intent_id"});
- return {
- payment_intent: {
- status: "requires_action",
- },
- };
- });
- completed = await event_status.check_status();
- assert.ok(!completed);
-});