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.

stripe: Upgrade stripe API to 2020-08-27 version.

Vishnu KS158cec84eccc
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 501eea0b1ff..24f5537ccd9 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -277,7 +277,7 @@ def catch_stripe_errors(func: CallableT) -> CallableT:
@catch_stripe_errors
def stripe_get_customer(stripe_customer_id: str) -> stripe.Customer:
- return stripe.Customer.retrieve(stripe_customer_id, expand=["default_source"])
+ return stripe.Customer.retrieve(stripe_customer_id, expand=["default_source", "sources"])
@catch_stripe_errors
@@ -337,7 +337,7 @@ def do_replace_payment_source(
)
if pay_invoices:
for stripe_invoice in stripe.Invoice.list(
- billing="charge_automatically", customer=stripe_customer.id, status="open"
+ collection_method="charge_automatically", customer=stripe_customer.id, status="open"
):
# The user will get either a receipt or a "failed payment" email, but the in-app
# messaging could be clearer here (e.g. it could explicitly tell the user that there
@@ -642,15 +642,15 @@ def process_initial_upgrade(
)
if charge_automatically:
- billing_method = "charge_automatically"
+ collection_method = "charge_automatically"
days_until_due = None
else:
- billing_method = "send_invoice"
+ collection_method = "send_invoice"
days_until_due = DEFAULT_INVOICE_DAYS_UNTIL_DUE
stripe_invoice = stripe.Invoice.create(
auto_advance=True,
- billing=billing_method,
+ collection_method=collection_method,
customer=customer.stripe_customer_id,
days_until_due=days_until_due,
statement_descriptor="Zulip Standard",
@@ -795,14 +795,14 @@ def invoice_plan(plan: CustomerPlan, event_time: datetime) -> None:
if invoice_item_created:
if plan.charge_automatically:
- billing_method = "charge_automatically"
+ collection_method = "charge_automatically"
days_until_due = None
else:
- billing_method = "send_invoice"
+ collection_method = "send_invoice"
days_until_due = DEFAULT_INVOICE_DAYS_UNTIL_DUE
stripe_invoice = stripe.Invoice.create(
auto_advance=True,
- billing=billing_method,
+ collection_method=collection_method,
customer=plan.customer.stripe_customer_id,
days_until_due=days_until_due,
statement_descriptor="Zulip Standard",
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.1.json
index 273b484f2cd..51636e7b376 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.1.json
@@ -19,7 +19,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -110,7 +110,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.2.json
index 3c278054f67..9e78c209154 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.2.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Charge.create.2.json
@@ -19,7 +19,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -110,7 +110,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
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 2a0c257612e..c72832c6406 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
@@ -21,7 +21,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -76,7 +76,13 @@
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
"shipping": null,
"source": {
@@ -106,7 +112,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
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 2df0a47ee68..33d35851aa3 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
@@ -21,7 +21,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -76,7 +76,13 @@
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000002/rcpt_NORMALIZED000000000000000000002",
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
+ },
"review": null,
"shipping": null,
"source": {
@@ -106,7 +112,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
@@ -132,7 +138,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -187,7 +193,13 @@
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
"shipping": null,
"source": {
@@ -217,7 +229,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.create.1.json
index 1e87c2923cd..88d5c69190f 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,54 +26,5 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json
index 17d00481138..3d384443cbd 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.retrieve.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -84,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.save.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.save.1.json
index e15c65677be..cface3d923f 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.save.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Customer.save.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,54 +26,5 @@
"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_NORMALIZED0001",
- "cvc_check": "pass",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000001",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000002",
- "last4": "4242",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- }
- ],
- "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
+ "tax_exempt": "none"
}
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 73eba385be7..d6bc3d9008a 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,7 +35,6 @@
"discounts": [],
"due_date": null,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhsD2X8vgpBNGtyNs4AI9",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh67i06KRHwdX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhsD2X8vgpBNGtA08rM3i"
+ "type": "invoiceitem"
},
{
"amount": -7200,
@@ -92,7 +92,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -107,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhrD2X8vgpBNGD9sFn8tJ",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pGP4ldOFFV",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -126,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhrD2X8vgpBNGf4QcWhh8"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -138,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -159,10 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 ad972d1b156..16494f1f453 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,7 +35,6 @@
"discounts": [],
"due_date": null,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000002",
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhzD2X8vgpBNGlpQImV07",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6VKlEd957ap",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhzD2X8vgpBNGwPaEObnC"
+ "type": "invoiceitem"
},
{
"amount": -36000,
@@ -92,7 +92,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -107,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhyD2X8vgpBNG58auoETW",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6Yrwv6xv7Bm",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -126,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhyD2X8vgpBNGQAOpJ22e"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -138,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -159,10 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 ab63d5de42f..f559909bc00 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 24000,
"amount_paid": 0,
"amount_remaining": 24000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,7 +35,6 @@
"discounts": [],
"due_date": null,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000003",
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1Hufi2D2X8vgpBNGLrDQYzwi",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pB9D73emPf",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Hufi2D2X8vgpBNGj13daEPu"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -94,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0003",
+ "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 Standard",
@@ -115,10 +121,9 @@
"subscription": null,
"subtotal": 24000,
"tax": null,
- "tax_percent": null,
"total": 24000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 64eb5442ccc..22bbcb021a6 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,11 +35,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhsD2X8vgpBNGtyNs4AI9",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh67i06KRHwdX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhsD2X8vgpBNGtA08rM3i"
+ "type": "invoiceitem"
},
{
"amount": -7200,
@@ -92,7 +92,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -107,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhrD2X8vgpBNGD9sFn8tJ",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pGP4ldOFFV",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -126,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhrD2X8vgpBNGf4QcWhh8"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -140,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -159,10 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 3266fdddb14..d3ab38b2a50 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,11 +35,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002TO6zL",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002690Fc",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002TO6zL/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002690Fc/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhzD2X8vgpBNGlpQImV07",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6VKlEd957ap",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhzD2X8vgpBNGwPaEObnC"
+ "type": "invoiceitem"
},
{
"amount": -36000,
@@ -92,7 +92,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -107,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhyD2X8vgpBNG58auoETW",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6Yrwv6xv7Bm",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -126,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhyD2X8vgpBNGQAOpJ22e"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -140,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"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 Standard",
@@ -159,10 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 fe307718afe..181f0ab4778 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 24000,
"amount_paid": 0,
"amount_remaining": 24000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,11 +35,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000039Nm5X",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Nv3oI",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000039Nm5X/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Nv3oI/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1Hufi2D2X8vgpBNGLrDQYzwi",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pB9D73emPf",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Hufi2D2X8vgpBNGj13daEPu"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -96,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Hufi3D2X8vgpBNGmAdVFaWD",
+ "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 Standard",
@@ -115,10 +121,9 @@
"subscription": null,
"subtotal": 24000,
"tax": null,
- "tax_percent": null,
"total": 24000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.1.json
index acdd6e51e89..70e650aca9d 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.1.json
@@ -2,16 +2,19 @@
"data": [
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -35,11 +37,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -50,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -65,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhsD2X8vgpBNGtyNs4AI9",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh67i06KRHwdX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -84,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhsD2X8vgpBNGtA08rM3i"
+ "type": "invoiceitem"
},
{
"amount": -7200,
@@ -94,7 +94,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -109,13 +109,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhrD2X8vgpBNGD9sFn8tJ",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pGP4ldOFFV",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -128,8 +128,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhrD2X8vgpBNGf4QcWhh8"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -142,12 +141,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -161,7 +166,6 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 0fe097a5661..7606155a4c5 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
@@ -2,16 +2,19 @@
"data": [
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -35,11 +37,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002TO6zL",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002690Fc",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002TO6zL/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002690Fc/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -50,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -65,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhzD2X8vgpBNGlpQImV07",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6VKlEd957ap",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -84,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhzD2X8vgpBNGwPaEObnC"
+ "type": "invoiceitem"
},
{
"amount": -36000,
@@ -94,7 +94,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -109,13 +109,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhyD2X8vgpBNG58auoETW",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6Yrwv6xv7Bm",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -128,8 +128,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhyD2X8vgpBNGQAOpJ22e"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -142,12 +141,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"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 Standard",
@@ -161,25 +166,27 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -194,7 +201,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -203,11 +209,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -218,7 +223,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -233,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhsD2X8vgpBNGtyNs4AI9",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh67i06KRHwdX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -252,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhsD2X8vgpBNGtA08rM3i"
+ "type": "invoiceitem"
},
{
"amount": -7200,
@@ -262,7 +266,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -277,13 +281,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhrD2X8vgpBNGD9sFn8tJ",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pGP4ldOFFV",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -296,8 +300,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhrD2X8vgpBNGf4QcWhh8"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -310,12 +313,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -329,7 +338,6 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.3.json
index b4c33382282..fc65f55b001 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--Invoice.list.3.json
@@ -2,16 +2,19 @@
"data": [
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 24000,
"amount_paid": 0,
"amount_remaining": 24000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -35,11 +37,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000039Nm5X",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Nv3oI",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000039Nm5X/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Nv3oI/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -50,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -65,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1Hufi2D2X8vgpBNGLrDQYzwi",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pB9D73emPf",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -84,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Hufi2D2X8vgpBNGj13daEPu"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Hufi3D2X8vgpBNGmAdVFaWD",
+ "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 Standard",
@@ -117,25 +123,27 @@
"subscription": null,
"subtotal": 24000,
"tax": null,
- "tax_percent": null,
"total": 24000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -150,7 +158,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -159,11 +166,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002TO6zL",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002690Fc",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002TO6zL/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002690Fc/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -174,7 +180,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -189,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhzD2X8vgpBNGlpQImV07",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6VKlEd957ap",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -208,8 +214,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhzD2X8vgpBNGwPaEObnC"
+ "type": "invoiceitem"
},
{
"amount": -36000,
@@ -218,7 +223,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -233,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhyD2X8vgpBNG58auoETW",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6Yrwv6xv7Bm",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -252,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhyD2X8vgpBNGQAOpJ22e"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -266,12 +270,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"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 Standard",
@@ -285,7 +295,6 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
@@ -294,16 +303,19 @@
},
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -318,7 +330,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -327,11 +338,10 @@
"discounts": [],
"due_date": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jwmXq/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001WK1Jr/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -342,7 +352,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -357,13 +367,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhsD2X8vgpBNGtyNs4AI9",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh67i06KRHwdX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -376,8 +386,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhsD2X8vgpBNGtA08rM3i"
+ "type": "invoiceitem"
},
{
"amount": -7200,
@@ -386,7 +395,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -401,13 +410,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhrD2X8vgpBNGD9sFn8tJ",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pGP4ldOFFV",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -420,8 +429,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1HufhrD2X8vgpBNGf4QcWhh8"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -434,12 +442,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -453,7 +467,6 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
"total_discount_amounts": [],
"total_tax_amounts": [],
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.1.json
index 4c81ac4cb9b..e9ac575f0d4 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.1.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhrD2X8vgpBNGD9sFn8tJ",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pGP4ldOFFV",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
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 047cc89ffd9..2d5bb1c054c 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
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhsD2X8vgpBNGtyNs4AI9",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh67i06KRHwdX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.3.json
index 03119d59cc6..82f73b1ae62 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.3.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhyD2X8vgpBNG58auoETW",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6Yrwv6xv7Bm",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.4.json
index 7274176f8b8..15f0a8edc53 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.4.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1HufhzD2X8vgpBNGlpQImV07",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6VKlEd957ap",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.5.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.5.json
index 7b09fad905f..77dc7d535d0 100644
--- a/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.5.json
+++ b/corporate/tests/stripe_fixtures/attach_discount_to_realm--InvoiceItem.create.5.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1Hufi2D2X8vgpBNGLrDQYzwi",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IVh6pB9D73emPf",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions--Charge.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions--Charge.create.1.json
index 850efd1f73f..3114f2b6137 100644
--- a/corporate/tests/stripe_fixtures/billing_page_permissions--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/billing_page_permissions--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,6 +19,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -25,6 +27,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -59,7 +62,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
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 5828b5becfc..88d5c69190f 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 15ba5b56984..3d384443cbd 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 2,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 15ba5b56984..3d384443cbd 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 2,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 84dc0f668dc..85ba0a34b97 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -89,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 e55446a8bad..ccbab49cdf2 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000015sJxq",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000015sJxq/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -91,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 99477bab140..f722b040756 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"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,
+ "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": -48000,
+ "unit_amount_decimal": "-48000"
}
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 d4270a431e2..3f346515e5e 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1000000000
},
"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,
+ "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": 8000,
+ "unit_amount_decimal": "8000"
}
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
index 611715f7d65..276fd1f723d 100644
--- 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,28 +26,5 @@
"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
+ "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
index 20e83ef1555..4cdc7ec73f5 100644
--- 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,54 +26,5 @@
"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"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": 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
index 611715f7d65..16a7af69f0e 100644
--- 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -34,21 +33,5 @@
"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
+ "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
index b7644511337..c62944d8685 100644
--- 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -84,21 +83,5 @@
"total_count": 1,
"url": "/v1/customers/cus_NORMALIZED0002/sources"
},
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.1.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.1.json
index e4bc8ad667c..f63271c60e8 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.1.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_773649 (None)",
+ "description": "realm_341283 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0001",
"invoice_prefix": "NORMA01",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "1",
- "realm_str": "realm_773649"
+ "realm_str": "realm_341283"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.2.json
index 853870a5d70..6ca54b638a5 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.2.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.2.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_311774 (None)",
+ "description": "realm_747106 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0002",
"invoice_prefix": "NORMA02",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "2",
- "realm_str": "realm_311774"
+ "realm_str": "realm_747106"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.3.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.3.json
index 367108a35b5..0c1332d0ea7 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.3.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.3.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_796925 (None)",
+ "description": "realm_384957 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0003",
"invoice_prefix": "NORMA03",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "3",
- "realm_str": "realm_796925"
+ "realm_str": "realm_384957"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0003/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0003/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0003/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.4.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.4.json
index c9bdaaaf5d4..1051e7c089f 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.4.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.4.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_466353 (None)",
+ "description": "realm_765764 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0004",
"invoice_prefix": "NORMA04",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "4",
- "realm_str": "realm_466353"
+ "realm_str": "realm_765764"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0004/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0004/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0004/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.5.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.5.json
index 9aaff7edb49..3f1ae85c506 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.5.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.5.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_871146 (None)",
+ "description": "realm_810625 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0005",
"invoice_prefix": "NORMA05",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "5",
- "realm_str": "realm_871146"
+ "realm_str": "realm_810625"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0005/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0005/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0005/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.6.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.6.json
index 29b89b6b384..acfd679ee60 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.6.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.6.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_275607 (None)",
+ "description": "realm_404452 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0006",
"invoice_prefix": "NORMA06",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "6",
- "realm_str": "realm_275607"
+ "realm_str": "realm_404452"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0006/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0006/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0006/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.7.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.7.json
index 0c4bdb08804..38fae9994b3 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.7.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Customer.create.7.json
@@ -1,14 +1,13 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
"currency": null,
"default_source": null,
"delinquent": false,
- "description": "realm_667253 (None)",
+ "description": "realm_752184 (None)",
"discount": null,
- "email": "[email protected]",
+ "email": "[email protected]",
"id": "cus_NORMALIZED0007",
"invoice_prefix": "NORMA07",
"invoice_settings": {
@@ -19,7 +18,7 @@
"livemode": false,
"metadata": {
"realm_id": "7",
- "realm_str": "realm_667253"
+ "realm_str": "realm_752184"
},
"name": null,
"next_invoice_sequence": 1,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0007/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0007/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0007/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.1.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.1.json
index 6569af1bc09..ae1ec0d48c9 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.1.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0002",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWTD2X8vgpBNGeBhxIJRV",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPn38wkV84NL",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWTD2X8vgpBNGsJaYnmWb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.2.json
index 9ba45ea03ea..501d74354aa 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.2.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0004",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000002",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWXD2X8vgpBNGvUdNYypd",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRP8I6UaXKjma",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWXD2X8vgpBNGE9ssZbrU"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.3.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.3.json
index ae312cf08cf..b84bed282fe 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.3.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.3.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0005",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000003",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWaD2X8vgpBNG2Bwcq97U",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPXPerAm8d5s",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWaD2X8vgpBNGpursqy1k"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.4.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.4.json
index 18733c71fae..c04d682b1c6 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.4.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.4.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0005",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000004",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWdD2X8vgpBNGWZ9YZH5I",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPDqSSyDKbv9",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWdD2X8vgpBNG2XxhJotY"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0004",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.5.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.5.json
index 51c05c49c29..eb462ce9db7 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.5.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.5.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000005",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWgD2X8vgpBNG8aZDuPfL",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPmcvspB67ms",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWgD2X8vgpBNGOIjdBP2A"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0005",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.6.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.6.json
index 6f284ae74cd..29639e13c9a 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.6.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.6.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000006",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWjD2X8vgpBNGCdWCb2b0",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPhPDQW59jge",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWjD2X8vgpBNGoimP1ybx"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0006",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.7.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.7.json
index 71b6464c110..d258cf50b19 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.7.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.7.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0007",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000007",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000007",
+ "id": "il_NORMALIZED00000000000007",
"invoice_item": "ii_NORMALIZED00000000000007",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWnD2X8vgpBNGonaCy8Je",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPPpAxytZfRb",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWnD2X8vgpBNGb9q2ENil"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0007",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.create.8.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.8.json
index 941ce43bacc..a10b430768d 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.8.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.create.8.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0007",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000008",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000008",
+ "id": "il_NORMALIZED00000000000008",
"invoice_item": "ii_NORMALIZED00000000000008",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWrD2X8vgpBNGo9vkCPfG",
+ "id": "price_NORMALIZED00000000000008",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPdALh7J9pfm",
+ "product": "prod_NORMALIZED0008",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWrD2X8vgpBNGwgPccK0V"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0008",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.1.json
index e6eea7a955f..fb22c30cfed 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0002",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000017UyVH",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001FnfOy",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000017UyVH/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001FnfOy/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWTD2X8vgpBNGeBhxIJRV",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPn38wkV84NL",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWTD2X8vgpBNGsJaYnmWb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWVD2X8vgpBNGGLOnw5bd",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.2.json
index cce03c8422e..d8d7d3d95ce 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0004",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002K5ysO",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002fYsO7",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002K5ysO/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002fYsO7/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWXD2X8vgpBNGvUdNYypd",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRP8I6UaXKjma",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWXD2X8vgpBNGE9ssZbrU"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWYD2X8vgpBNGjHEu0VCP",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,7 +121,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 3fdac241d5b..5b8b7b041ff 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0005",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000033OCj1",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Bhq0y",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000033OCj1/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Bhq0y/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWaD2X8vgpBNG2Bwcq97U",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPXPerAm8d5s",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWaD2X8vgpBNGpursqy1k"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWcD2X8vgpBNG3oiqJwm0",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.4.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.4.json
index e693a35516b..e6ab3fec6a7 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0005",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004MR4hK",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004J6xR5",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004MR4hK/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004J6xR5/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWdD2X8vgpBNGWZ9YZH5I",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPDqSSyDKbv9",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWdD2X8vgpBNG2XxhJotY"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWfD2X8vgpBNGrdVPwOSc",
+ "payment_intent": "pi_NORMALIZED00000000000004",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.5.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.5.json
index 88b571e4115..487a759fe6c 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000059dDfj",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005ncBbj",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000059dDfj/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005ncBbj/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWgD2X8vgpBNG8aZDuPfL",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPmcvspB67ms",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWgD2X8vgpBNGOIjdBP2A"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWhD2X8vgpBNGZr4xgMC3",
+ "payment_intent": "pi_NORMALIZED00000000000005",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.6.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.6.json
index 694c49d5674..db680e9c6b1 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006sHPi7",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006nZ4k4",
"id": "in_NORMALIZED00000000000006",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006sHPi7/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006nZ4k4/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWjD2X8vgpBNGCdWCb2b0",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPhPDQW59jge",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWjD2X8vgpBNGoimP1ybx"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWlD2X8vgpBNGZD62kg07",
+ "payment_intent": "pi_NORMALIZED00000000000006",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.7.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.7.json
index 3ada3577c48..db334ba810a 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0007",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000074tznY",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000079nVn3",
"id": "in_NORMALIZED00000000000007",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000074tznY/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000079nVn3/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000007",
+ "id": "il_NORMALIZED00000000000007",
"invoice_item": "ii_NORMALIZED00000000000007",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWnD2X8vgpBNGonaCy8Je",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPPpAxytZfRb",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWnD2X8vgpBNGb9q2ENil"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWpD2X8vgpBNGT32sTUXY",
+ "payment_intent": "pi_NORMALIZED00000000000007",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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.finalize_invoice.8.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--Invoice.finalize_invoice.8.json
index 8403ebf9331..93014d80dae 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0007",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000008kYrKh",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000008qCFwv",
"id": "in_NORMALIZED00000000000008",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000008kYrKh/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000008qCFwv/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000008",
+ "id": "il_NORMALIZED00000000000008",
"invoice_item": "ii_NORMALIZED00000000000008",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWrD2X8vgpBNGo9vkCPfG",
+ "id": "price_NORMALIZED00000000000008",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPdALh7J9pfm",
+ "product": "prod_NORMALIZED0008",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWrD2X8vgpBNGwgPccK0V"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWtD2X8vgpBNGOsqqXzqw",
+ "payment_intent": "pi_NORMALIZED00000000000008",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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 03f4866f22f..921882725e9 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,13 +23,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0002",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000017UyVH",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001FnfOy",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000017UyVH/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001FnfOy/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWTD2X8vgpBNGeBhxIJRV",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPn38wkV84NL",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWTD2X8vgpBNGsJaYnmWb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWVD2X8vgpBNGGLOnw5bd",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -127,7 +123,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 3f407204653..dd3f830d77b 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,13 +23,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0004",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002K5ysO",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002fYsO7",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002K5ysO/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002fYsO7/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWXD2X8vgpBNGvUdNYypd",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRP8I6UaXKjma",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWXD2X8vgpBNGE9ssZbrU"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWYD2X8vgpBNGjHEu0VCP",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -127,7 +123,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 f68fea69251..1d1d5443b14 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,13 +23,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0005",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004MR4hK",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004J6xR5",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004MR4hK/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004J6xR5/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWdD2X8vgpBNGWZ9YZH5I",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPDqSSyDKbv9",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWdD2X8vgpBNG2XxhJotY"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWfD2X8vgpBNGrdVPwOSc",
+ "payment_intent": "pi_NORMALIZED00000000000004",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -127,7 +123,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
@@ -136,12 +131,12 @@
},
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -149,7 +144,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -158,13 +152,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0005",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -173,11 +166,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000033OCj1",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Bhq0y",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000033OCj1/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003Bhq0y/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -188,7 +180,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -203,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWaD2X8vgpBNG2Bwcq97U",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPXPerAm8d5s",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -222,8 +214,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWaD2X8vgpBNGpursqy1k"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -238,7 +229,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1JFeWcD2X8vgpBNG3oiqJwm0",
+ "payment_intent": "pi_NORMALIZED00000000000003",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -261,7 +252,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 09a3caf6218..5acf97e8cc2 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,13 +23,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006sHPi7",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006nZ4k4",
"id": "in_NORMALIZED00000000000006",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006sHPi7/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006nZ4k4/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWjD2X8vgpBNGCdWCb2b0",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPhPDQW59jge",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWjD2X8vgpBNGoimP1ybx"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -127,7 +123,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
@@ -136,12 +131,12 @@
},
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -149,7 +144,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -158,13 +152,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -173,11 +166,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000059dDfj",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005ncBbj",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000059dDfj/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005ncBbj/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -188,7 +180,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -203,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWgD2X8vgpBNG8aZDuPfL",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPmcvspB67ms",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -222,8 +214,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWgD2X8vgpBNGOIjdBP2A"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -261,7 +252,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 84470f6a715..85369738aae 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000059dDfj",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005ncBbj",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000059dDfj/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005ncBbj/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000005",
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWgD2X8vgpBNG8aZDuPfL",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPmcvspB67ms",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWgD2X8vgpBNGOIjdBP2A"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -125,7 +121,6 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 cb8978ebdae..ed53f260f91 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -22,13 +21,12 @@
"custom_fields": null,
"customer": "cus_NORMALIZED0006",
"customer_address": null,
- "customer_email": "[email protected]",
+ "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": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006sHPi7",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006nZ4k4",
"id": "in_NORMALIZED00000000000006",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006sHPi7/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000006nZ4k4/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000006",
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWjD2X8vgpBNGCdWCb2b0",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPhPDQW59jge",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1JFeWjD2X8vgpBNGoimP1ybx"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -125,10 +121,9 @@
"subscription": null,
"subtotal": 10000,
"tax": null,
- "tax_percent": null,
"total": 10000,
"total_discount_amounts": [],
"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--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.1.json
index ef4997f285c..ff63b3bfc09 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.1.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWTD2X8vgpBNGeBhxIJRV",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPn38wkV84NL",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.2.json
index 257bd73f25b..b8e465e2899 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.2.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWXD2X8vgpBNGvUdNYypd",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRP8I6UaXKjma",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.3.json
index 7b2e8f82872..55df81f3db9 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.3.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWaD2X8vgpBNG2Bwcq97U",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPXPerAm8d5s",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.4.json
index dd99b2d4614..9d82becfe2b 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.4.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWdD2X8vgpBNGWZ9YZH5I",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPDqSSyDKbv9",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.5.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.5.json
index e374cfcf263..9542efa345c 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.5.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.5.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWgD2X8vgpBNG8aZDuPfL",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPmcvspB67ms",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.6.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.6.json
index ef92fc8fc69..a7b8d4c32b5 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.6.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.6.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWjD2X8vgpBNGCdWCb2b0",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPhPDQW59jge",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.7.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.7.json
index 22628d77d28..77122d33f7a 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.7.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.7.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWnD2X8vgpBNGonaCy8Je",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPPpAxytZfRb",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.8.json b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.8.json
index 1a6ad6a3c08..d37c9bcea0b 100644
--- a/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.8.json
+++ b/corporate/tests/stripe_fixtures/downgrade_small_realms_behind_on_payments_as_needed--InvoiceItem.create.8.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1JFeWrD2X8vgpBNGo9vkCPfG",
+ "id": "price_NORMALIZED00000000000008",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JtRPdALh7J9pfm",
+ "product": "prod_NORMALIZED0008",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/fixed_price_plans--Customer.create.1.json b/corporate/tests/stripe_fixtures/fixed_price_plans--Customer.create.1.json
index 27cdf2c0a85..730ed973b02 100644
--- a/corporate/tests/stripe_fixtures/fixed_price_plans--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/fixed_price_plans--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,32 +21,10 @@
"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
+ "tax_exempt": "none"
}
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 b3163203fa2..6cf3eb01e25 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
@@ -67,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 e9f91d76341..2c7d1773a56 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 100,
"amount_paid": 0,
"amount_remaining": 100,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 100,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 100,
+ "unit_amount_decimal": "100"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -67,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 100,
"tax": null,
- "tax_percent": null,
"total": 100,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 57cd336c5b4..330d8fb2413 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001SGgJs",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001SGgJs/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
@@ -69,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96B0Gh0CmXqmnwFFVAGxWQ",
+ "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 Standard",
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 422f5aa598d..c93e2e5e606 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 100,
"amount_paid": 0,
"amount_remaining": 100,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED000000000000000248qeQ",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000248qeQ/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 100,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 100,
+ "unit_amount_decimal": "100"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -69,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96B2Gh0CmXqmnwZLKqLOFy",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 100,
"tax": null,
- "tax_percent": null,
"total": 100,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 561e7bc0cec..2d609e9ebc1 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 100,
"amount_paid": 0,
"amount_remaining": 100,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED000000000000000248qeQ",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000248qeQ/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 100,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 100,
+ "unit_amount_decimal": "100"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -71,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96B2Gh0CmXqmnwZLKqLOFy",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -90,14 +123,16 @@
"subscription": null,
"subtotal": 100,
"tax": null,
- "tax_percent": null,
"total": 100,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -105,7 +140,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -123,22 +161,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001SGgJs",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001SGgJs/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -148,6 +190,25 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
@@ -166,12 +227,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96B0Gh0CmXqmnwFFVAGxWQ",
+ "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 Standard",
@@ -185,9 +252,10 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 81ab7af590b..9f60bb15ae0 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
"tax_rates": [],
- "unit_amount": 8000
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
}
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 f9ae5a68661..47eac324e8d 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 100,
+ "unit_amount_decimal": "100"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
"tax_rates": [],
- "unit_amount": 100
+ "unit_amount": 100,
+ "unit_amount_decimal": "100"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.create.1.json
index 48d96fefd7f..c039b422a4d 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -27,54 +26,5 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 2485749ffd1..3c8c2ea0a06 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -84,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 2485749ffd1..3c8c2ea0a06 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -84,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 2aee093b591..3c8c2ea0a06 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
@@ -1,104 +1,87 @@
{
- "account_balance": 0,
- "address": null,
- "balance": 0,
- "created": 1010000001,
- "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_NORMALIZED0001",
- "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_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": [
- {
- "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_NORMALIZED0001",
- "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_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
- }
+ "address": null,
+ "balance": 0,
+ "created": 1010000001,
+ "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_NORMALIZED0001",
+ "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_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": [
+ {
+ "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_NORMALIZED0001",
+ "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_NORMALIZED0001/sources"
+ },
+ "tax_exempt": "none"
+}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.1.json
index dcf2a013fcf..af437c2a5f1 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.1.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 120000,
"amount_paid": 0,
"amount_remaining": 120000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 120000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aAGh0CmXqmnwYD2vuFL3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -68,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 120000,
"tax": null,
- "tax_percent": null,
"total": 120000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.2.json
index c67576116ae..373239ea1ce 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.2.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5172,
"amount_paid": 0,
"amount_remaining": 5172,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "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": 5172,
"currency": "usd",
"description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1357095845
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1293,
+ "unit_amount_decimal": "1293"
+ },
"proration": false,
"quantity": 4,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aCGh0CmXqmnwp7mzzDq1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -68,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 5172,
"tax": null,
- "tax_percent": null,
"total": 5172,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.3.json
index 636a1cb4dd2..77c8cd4b55a 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.3.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.create.3.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 152000,
"amount_paid": 0,
"amount_remaining": 152000,
@@ -8,11 +9,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000004,
+ "created": 1010000005,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "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": 152000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000006,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000003",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0003",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 19,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aEGh0CmXqmnwbJpsbILw"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -68,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0003",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 152000,
"tax": null,
- "tax_percent": null,
"total": 152000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 857c0a8b08a..92f0358037b 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 120000,
"amount_paid": 0,
"amount_remaining": 120000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 120000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aAGh0CmXqmnwYD2vuFL3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -70,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aBGh0CmXqmnw3RdjXFtK",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 120000,
"tax": null,
- "tax_percent": null,
"total": 120000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 8575f0b461b..e04a6bd8fdc 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5172,
"amount_paid": 0,
"amount_remaining": 5172,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000027eQ4i",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nlvXf",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000027eQ4i/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nlvXf/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5172,
"currency": "usd",
"description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1357095845
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1293,
+ "unit_amount_decimal": "1293"
+ },
"proration": false,
"quantity": 4,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aCGh0CmXqmnwp7mzzDq1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -70,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aDGh0CmXqmnwTdKviFVy",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 5172,
"tax": null,
- "tax_percent": null,
"total": 5172,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 1a4b0cb4eab..5770e26e917 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 152000,
"amount_paid": 0,
"amount_remaining": 152000,
@@ -8,11 +9,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000004,
+ "created": 1010000005,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003u5uCV",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003tSAyS",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003u5uCV/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003tSAyS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 152000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000006,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000003",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0003",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 19,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aEGh0CmXqmnwbJpsbILw"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -70,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aGGh0CmXqmnwehKKVEuG",
+ "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": "Zulip Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 152000,
"tax": null,
- "tax_percent": null,
"total": 152000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.3.json
index 67b144d5887..b94a420468e 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Invoice.list.3.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 120000,
"amount_paid": 0,
"amount_remaining": 120000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 120000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aAGh0CmXqmnwYD2vuFL3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aBGh0CmXqmnw3RdjXFtK",
+ "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 Standard",
@@ -91,9 +123,10 @@
"subscription": null,
"subtotal": 120000,
"tax": null,
- "tax_percent": null,
"total": 120000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 67b144d5887..b94a420468e 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 120000,
"amount_paid": 0,
"amount_remaining": 120000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 120000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aAGh0CmXqmnwYD2vuFL3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aBGh0CmXqmnw3RdjXFtK",
+ "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 Standard",
@@ -91,9 +123,10 @@
"subscription": null,
"subtotal": 120000,
"tax": null,
- "tax_percent": null,
"total": 120000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 58547c136a2..ee24773fedd 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5172,
"amount_paid": 0,
"amount_remaining": 5172,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000027eQ4i",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nlvXf",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000027eQ4i/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nlvXf/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5172,
"currency": "usd",
"description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1357095845
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1293,
+ "unit_amount_decimal": "1293"
+ },
"proration": false,
"quantity": 4,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aCGh0CmXqmnwp7mzzDq1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aDGh0CmXqmnwTdKviFVy",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -91,14 +123,16 @@
"subscription": null,
"subtotal": 5172,
"tax": null,
- "tax_percent": null,
"total": 5172,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 120000,
"amount_paid": 0,
"amount_remaining": 120000,
@@ -106,7 +140,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -124,22 +161,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 120000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -149,13 +190,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aAGh0CmXqmnwYD2vuFL3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -168,12 +227,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aBGh0CmXqmnw3RdjXFtK",
+ "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 Standard",
@@ -187,9 +252,10 @@
"subscription": null,
"subtotal": 120000,
"tax": null,
- "tax_percent": null,
"total": 120000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 fdee84eb0d8..ee545e2f4be 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 152000,
"amount_paid": 0,
"amount_remaining": 152000,
@@ -10,11 +11,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
- "created": 1010000004,
+ "created": 1010000005,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003u5uCV",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003tSAyS",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003u5uCV/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003tSAyS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 152000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000006,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000003",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0003",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 19,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aEGh0CmXqmnwbJpsbILw"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aGGh0CmXqmnwehKKVEuG",
+ "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": "Zulip Standard",
@@ -91,14 +123,16 @@
"subscription": null,
"subtotal": 152000,
"tax": null,
- "tax_percent": null,
"total": 152000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5172,
"amount_paid": 0,
"amount_remaining": 5172,
@@ -106,7 +140,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -124,22 +161,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000027eQ4i",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nlvXf",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000027eQ4i/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002nlvXf/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5172,
"currency": "usd",
"description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -149,13 +190,31 @@
"start": 1357095845
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1293,
+ "unit_amount_decimal": "1293"
+ },
"proration": false,
"quantity": 4,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aCGh0CmXqmnwp7mzzDq1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -168,12 +227,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aDGh0CmXqmnwTdKviFVy",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -187,14 +252,16 @@
"subscription": null,
"subtotal": 5172,
"tax": null,
- "tax_percent": null,
"total": 5172,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 120000,
"amount_paid": 0,
"amount_remaining": 120000,
@@ -202,7 +269,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -220,22 +290,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001PVAbb/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001kJlNF/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 120000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -245,13 +319,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1Gb9aAGh0CmXqmnwYD2vuFL3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -264,12 +356,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9aBGh0CmXqmnw3RdjXFtK",
+ "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 Standard",
@@ -283,9 +381,10 @@
"subscription": null,
"subtotal": 120000,
"tax": null,
- "tax_percent": null,
"total": 120000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.1.json
index f99447209e6..4bcd7ddb1e4 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,6 +16,25 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000002,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 15,
"subscription": null,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.2.json
index 04af1e14a49..bf335063955 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.2.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Additional license (Jan 2, 2013 - Mar 2, 2013)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,6 +16,25 @@
"start": 1357095845
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 1293,
+ "unit_amount_decimal": "1293"
+ },
"proration": false,
"quantity": 4,
"subscription": null,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.3.json
index 47ee85f59a3..451eb3a7187 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--InvoiceItem.create.3.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
@@ -15,6 +16,25 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000006,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000003",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0003",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 19,
"subscription": null,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Token.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Token.create.1.json
index 4edd6803f06..1d208a83a96 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Token.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_card--Token.create.1.json
@@ -24,7 +24,7 @@
"tokenization_method": null
},
"client_ip": "0.0.0.0",
- "created": 1010000001,
+ "created": 1010000007,
"id": "tok_NORMALIZED00000000000001",
"livemode": false,
"object": "token",
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.create.1.json
index 859f8d187d4..51ee3ff9762 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -27,28 +26,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.1.json
index 859f8d187d4..30370206ffe 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -34,21 +33,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.2.json
index 859f8d187d4..30370206ffe 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Customer.retrieve.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -34,21 +33,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.1.json
index d0c4723502a..4535a89e76b 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.1.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZfGh0CmXqmnwgD90XzPz"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -68,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.2.json
index 47a832187de..9ccd8e54955 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--Invoice.create.2.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,11 +9,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000003,
+ "created": 1010000004,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000002",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000005,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZiGh0CmXqmnwam6qjSRo"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -68,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 a722423d0e9..c45c92e79b3 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZfGh0CmXqmnwgD90XzPz"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -70,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZgGh0CmXqmnwpXTr61TB",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 28c295334fe..bd56f48ae25 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,11 +9,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000003,
+ "created": 1010000004,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002j6l5G",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002MbjN2",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002j6l5G/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002MbjN2/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -51,13 +59,31 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000005,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZiGh0CmXqmnwam6qjSRo"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -70,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZjGh0CmXqmnwStWCBc7h",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -89,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 98ed046deeb..3813de7d75f 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZfGh0CmXqmnwgD90XzPz"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZgGh0CmXqmnwpXTr61TB",
+ "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 Standard",
@@ -91,9 +123,10 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 98ed046deeb..3813de7d75f 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZfGh0CmXqmnwgD90XzPz"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZgGh0CmXqmnwpXTr61TB",
+ "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 Standard",
@@ -91,9 +123,10 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 98ed046deeb..3813de7d75f 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZfGh0CmXqmnwgD90XzPz"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZgGh0CmXqmnwpXTr61TB",
+ "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 Standard",
@@ -91,9 +123,10 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 9a56d5fcbf6..f2f15dab0f5 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -10,11 +11,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000003,
+ "created": 1010000004,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002j6l5G",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002MbjN2",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002j6l5G/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002MbjN2/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -53,13 +61,31 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000005,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZiGh0CmXqmnwam6qjSRo"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -72,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZjGh0CmXqmnwStWCBc7h",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -91,14 +123,16 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -106,7 +140,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -124,22 +161,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001jVE6V/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001tmvZS/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -149,13 +190,31 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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",
- "unique_id": "il_1Gb9ZfGh0CmXqmnwgD90XzPz"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -168,12 +227,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1Gb9ZgGh0CmXqmnwpXTr61TB",
+ "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 Standard",
@@ -187,9 +252,10 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.1.json
index f4d06581cbf..2c6207a72d0 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,6 +16,25 @@
"start": 1330657445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
diff --git a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.2.json
index 3e27f6a83b2..fcd766ca2e8 100644
--- a/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/free_trial_upgrade_by_invoice--InvoiceItem.create.2.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,6 +16,25 @@
"start": 1362193445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000005,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Charge.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Charge.create.1.json
index 850efd1f73f..3114f2b6137 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,6 +19,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -25,6 +27,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -59,7 +62,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Customer.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Customer.create.1.json
index 5828b5becfc..88d5c69190f 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 8c98b79de3c..46ffedbaae8 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.1.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -89,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 db59d46dde6..21fa5ade81a 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.create.2.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 80697,
"amount_paid": 0,
"amount_remaining": 80697,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "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": 7255,
"currency": "usd",
"description": "Additional license (Feb 5, 2013 - Jan 2, 2014)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1360033445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 7255,
+ "unit_amount_decimal": "7255"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": 56000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 7,
"subscription": null,
@@ -84,8 +132,10 @@
"amount": 17442,
"currency": "usd",
"description": "Additional license (Apr 11, 2012 - Jan 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -95,6 +145,25 @@
"start": 1334113445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000005",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0005",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5814,
+ "unit_amount_decimal": "5814"
+ },
"proration": false,
"quantity": 3,
"subscription": null,
@@ -111,14 +180,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -132,8 +207,9 @@
"subscription": null,
"subtotal": 80697,
"tax": null,
- "tax_percent": null,
"total": 80697,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 4ffeb9c163e..9ddaf8d9b21 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GKuTy",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GKuTy/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -91,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 46936509d1b..448311ac243 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 80697,
"amount_paid": 0,
"amount_remaining": 80697,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002cca5R",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002cca5R/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 7255,
"currency": "usd",
"description": "Additional license (Feb 5, 2013 - Jan 2, 2014)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1360033445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 7255,
+ "unit_amount_decimal": "7255"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": 56000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 7,
"subscription": null,
@@ -84,8 +132,10 @@
"amount": 17442,
"currency": "usd",
"description": "Additional license (Apr 11, 2012 - Jan 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -95,6 +145,25 @@
"start": 1334113445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000005",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0005",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5814,
+ "unit_amount_decimal": "5814"
+ },
"proration": false,
"quantity": 3,
"subscription": null,
@@ -113,12 +182,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96BCGh0CmXqmnwfafGafrD",
+ "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 Standard",
@@ -132,8 +207,9 @@
"subscription": null,
"subtotal": 80697,
"tax": null,
- "tax_percent": null,
"total": 80697,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.1.json b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.1.json
index 1d595cdb750..c3c27415e8a 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--Invoice.list.1.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 80697,
"amount_paid": 0,
"amount_remaining": 80697,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002cca5R",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002cca5R/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 7255,
"currency": "usd",
"description": "Additional license (Feb 5, 2013 - Jan 2, 2014)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"start": 1360033445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 7255,
+ "unit_amount_decimal": "7255"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -64,8 +91,10 @@
"amount": 56000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -75,6 +104,25 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 7,
"subscription": null,
@@ -86,8 +134,10 @@
"amount": 17442,
"currency": "usd",
"description": "Additional license (Apr 11, 2012 - Jan 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -97,6 +147,25 @@
"start": 1334113445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000005",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0005",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5814,
+ "unit_amount_decimal": "5814"
+ },
"proration": false,
"quantity": 3,
"subscription": null,
@@ -115,12 +184,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96BCGh0CmXqmnwfafGafrD",
+ "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 Standard",
@@ -134,14 +209,16 @@
"subscription": null,
"subtotal": 80697,
"tax": null,
- "tax_percent": null,
"total": 80697,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -149,7 +226,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -167,22 +247,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GKuTy",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GKuTy/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -192,6 +276,25 @@
"start": 1325473445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -203,8 +306,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -214,6 +319,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -232,12 +356,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -251,9 +381,10 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 99477bab140..f722b040756 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"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,
+ "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": -48000,
+ "unit_amount_decimal": "-48000"
}
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 b79216ebdc0..9ed190192f5 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.2.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1325473445
},
"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,
+ "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": 8000,
+ "unit_amount_decimal": "8000"
}
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 aef59ee7621..3658be4b0bd 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.3.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Additional license (Apr 11, 2012 - Jan 2, 2013)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000005",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1334113445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1000000000,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000005",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0005",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5814,
+ "unit_amount_decimal": "5814"
+ },
"proration": false,
"quantity": 3,
"subscription": null,
"tax_rates": [],
- "unit_amount": 5814
+ "unit_amount": 5814,
+ "unit_amount_decimal": "5814"
}
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 aa928f1842d..56f0e3dffd8 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.4.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000004",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1357095845
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 7,
"subscription": null,
"tax_rates": [],
- "unit_amount": 8000
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
}
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 b25f0440e61..63d5c133335 100644
--- a/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.5.json
+++ b/corporate/tests/stripe_fixtures/invoice_plan--InvoiceItem.create.5.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Additional license (Feb 5, 2013 - Jan 2, 2014)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1360033445
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 7255,
+ "unit_amount_decimal": "7255"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
"tax_rates": [],
- "unit_amount": 7255
+ "unit_amount": 7255,
+ "unit_amount_decimal": "7255"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Charge.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Charge.create.1.json
index 850efd1f73f..3114f2b6137 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,6 +19,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -25,6 +27,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -59,7 +62,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
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
index 5828b5becfc..88d5c69190f 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "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_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
+ "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
index 15ba5b56984..e5926664e45 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "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
index 15ba5b56984..e5926664e45 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json
index 15ba5b56984..e5926664e45 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.3.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "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
index 53929708037..0907250d59a 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.4.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json
index 53929708037..0907250d59a 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.5.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.6.json
index 20e5035a5bf..4d22405ef6c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.6.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.retrieve.6.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.1.json
index 03f37a1c343..1465905217e 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.1.json
@@ -1,6 +1,19 @@
{
"_message": "Your card was declined.",
"code": "card_declined",
+ "error": {
+ "charge": null,
+ "code": "card_declined",
+ "decline_code": "lost_card",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "param": "",
+ "payment_intent": null,
+ "payment_method": null,
+ "setup_intent": null,
+ "source": null,
+ "type": "card_error"
+ },
"headers": {
"Connection": "keep-alive",
"Content-Length": "235",
@@ -17,7 +30,9 @@
"idempotency-key": "00000000-0000-0000-0000-000000000000",
"original-request": "req_NORMALIZED0001",
"request-id": "req_NORMALIZED0001",
- "stripe-version": "2019-03-14"
+ "stripe-should-retry": "false",
+ "stripe-version": "2020-08-27",
+ "x-stripe-c-cost": "6"
},
"http_body": "{\n \"error\": {\n \"code\": \"card_declined\",\n \"decline_code\": \"lost_card\",\n \"doc_url\": \"https://stripe.com/docs/error-codes/card-declined\",\n \"message\": \"Your card was declined.\",\n \"param\": \"\",\n \"type\": \"card_error\"\n }\n}\n",
"http_status": 402,
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.2.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.2.json
index 815301bdfaa..a985aa0445e 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"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_NORMALIZED0001",
- "cvc_check": "pass",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000002",
- "last4": "0341",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- }
- ],
- "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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.3.json
index af72b95c5db..19028c05db0 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Customer.save.3.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 3,
"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": "MasterCard",
- "country": "US",
- "customer": "cus_NORMALIZED0001",
- "cvc_check": "pass",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000003",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000003",
- "last4": "4444",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- }
- ],
- "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
+ "tax_exempt": "none"
}
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
index 84dc0f668dc..85ba0a34b97 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.1.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -89,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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
index 92be5ca0de3..c8f2784982c 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.create.2.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 0,
"amount_remaining": 5000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "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": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -67,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "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,
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": null,
"total": 5000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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
index e55446a8bad..bc44ce72db5 100644
--- 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GxeBj",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GxeBj/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -91,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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
index fdf4e7473f3..4ea76045c50 100644
--- 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 0,
"amount_remaining": 5000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -69,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "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": null,
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": 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.1.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.1.json
index bbca7783ebc..5065640a135 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.1.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 0,
"amount_remaining": 5000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -71,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "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": null,
@@ -90,9 +123,10 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": 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
index 52945aa1cbd..ec3f6c264f9 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.2.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 0,
"amount_remaining": 5000,
@@ -10,7 +11,10 @@
"attempt_count": 1,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": "ch_NORMALIZED00000000000002",
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -71,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "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": null,
@@ -90,9 +123,10 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": 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.3.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.3.json
index 52945aa1cbd..ec3f6c264f9 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.3.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 0,
"amount_remaining": 5000,
@@ -10,7 +11,10 @@
"attempt_count": 1,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": "ch_NORMALIZED00000000000002",
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -71,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "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": null,
@@ -90,9 +123,10 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": 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.4.json b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.4.json
index 159a049627a..6d9fb114901 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.4.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.list.4.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 5000,
"amount_remaining": 0,
@@ -10,7 +11,10 @@
"attempt_count": 1,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": "ch_NORMALIZED00000000000003",
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -71,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": true,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "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": null,
@@ -90,14 +123,16 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": null,
"total": 5000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
},
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -105,7 +140,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -123,22 +161,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GxeBj",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GxeBj/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -148,6 +190,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -159,8 +220,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -170,6 +233,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -188,12 +270,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -207,9 +295,10 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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
index 6083899e299..c1639c89c6d 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.1.json
@@ -1,9 +1,241 @@
{
"_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": "Pacific",
+ "country": "United States",
+ "line1": "Under the sea,",
+ "line2": null,
+ "postal_code": "33333",
+ "state": null
+ },
+ "email": null,
+ "name": "Ada Starr",
+ "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_NORMALIZED00000000000002",
+ "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_NORMALIZED00000000000001",
+ "payment_method": "card_NORMALIZED00000000000002",
+ "payment_method_details": {
+ "card": {
+ "brand": "visa",
+ "checks": {
+ "address_line1_check": "pass",
+ "address_postal_code_check": "pass",
+ "cvc_check": "pass"
+ },
+ "country": "US",
+ "exp_month": 3,
+ "exp_year": 2033,
+ "fingerprint": "NORMALIZED000002",
+ "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": {
+ "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_NORMALIZED0001",
+ "cvc_check": "pass",
+ "dynamic_last4": null,
+ "exp_month": 3,
+ "exp_year": 2033,
+ "fingerprint": "NORMALIZED000002",
+ "funding": "credit",
+ "id": "card_NORMALIZED00000000000002",
+ "last4": "0341",
+ "metadata": {},
+ "name": "Ada Starr",
+ "object": "card",
+ "tokenization_method": 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_NORMALIZED00000000000001"
+ },
+ "client_secret": "pi_NORMALIZED00000000000001_secret_HnG1WHH5Lq8sSIQEgu5DgsxBW",
+ "confirmation_method": "automatic",
+ "created": 1000000000,
+ "currency": "usd",
+ "customer": "cus_NORMALIZED0001",
+ "description": "Payment for Invoice",
+ "id": "pi_NORMALIZED00000000000001",
+ "invoice": "in_NORMALIZED00000000000002",
+ "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.",
+ "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_NORMALIZED0001",
+ "cvc_check": "pass",
+ "dynamic_last4": null,
+ "exp_month": 3,
+ "exp_year": 2033,
+ "fingerprint": "NORMALIZED000002",
+ "funding": "credit",
+ "id": "card_NORMALIZED00000000000002",
+ "last4": "0341",
+ "metadata": {},
+ "name": "Ada Starr",
+ "object": "card",
+ "tokenization_method": null
+ },
+ "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": null,
+ "setup_intent": null,
+ "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_NORMALIZED0001",
+ "cvc_check": "pass",
+ "dynamic_last4": null,
+ "exp_month": 3,
+ "exp_year": 2033,
+ "fingerprint": "NORMALIZED000002",
+ "funding": "credit",
+ "id": "card_NORMALIZED00000000000002",
+ "last4": "0341",
+ "metadata": {},
+ "name": "Ada Starr",
+ "object": "card",
+ "tokenization_method": null
+ },
+ "type": "card_error"
+ },
"headers": {
"Connection": "keep-alive",
- "Content-Length": "7889",
+ "Content-Length": "7985",
"Content-Type": "application/json",
"Date": "NORMALIZED DATETIME",
"Server": "nginx",
@@ -17,9 +249,11 @@
"idempotency-key": "00000000-0000-0000-0000-000000000000",
"original-request": "req_NORMALIZED0002",
"request-id": "req_NORMALIZED0002",
- "stripe-version": "2019-03-14"
+ "stripe-should-retry": "false",
+ "stripe-version": "2020-08-27",
+ "x-stripe-c-cost": "7"
},
- "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_1F96BhGh0CmXqmnwXdcsnxHY\",\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_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\": \"Pacific\",\n \"country\": \"United States\",\n \"line1\": \"Under the sea,\",\n \"line2\": null,\n \"postal_code\": \"33333\",\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Ada Starr\",\n \"phone\": null\n },\n \"captured\": false,\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Payment for invoice FF56B020-0002\",\n \"destination\": null,\n \"dispute\": 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\": 11,\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_1F96BhGh0CmXqmnwXdcsnxHY\",\n \"payment_method\": \"card_NORMALIZED00000000000002\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": \"pass\",\n \"address_postal_code_check\": \"pass\",\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\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\": \"https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000002/rcpt_NORMALIZED000000000000000000002\",\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\": {\n \"id\": \"card_NORMALIZED00000000000002\",\n \"object\": \"card\",\n \"address_city\": \"Pacific\",\n \"address_country\": \"United States\",\n \"address_line1\": \"Under the sea,\",\n \"address_line1_check\": \"pass\",\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": \"33333\",\n \"address_zip_check\": \"pass\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\n \"metadata\": {\n },\n \"name\": \"Ada Starr\",\n \"tokenization_method\": null\n },\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_1F96BhGh0CmXqmnwXdcsnxHY\"\n },\n \"client_secret\": \"pi_1F96BhGh0CmXqmnwXdcsnxHY_secret_Nl29CEFAEgp65EZvfiNxjnetP\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1000000000,\n \"currency\": \"usd\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"description\": \"Payment for invoice FF56B020-0002\",\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 \"source\": {\n \"id\": \"card_NORMALIZED00000000000002\",\n \"object\": \"card\",\n \"address_city\": \"Pacific\",\n \"address_country\": \"United States\",\n \"address_line1\": \"Under the sea,\",\n \"address_line1_check\": \"pass\",\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": \"33333\",\n \"address_zip_check\": \"pass\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\n \"metadata\": {\n },\n \"name\": \"Ada Starr\",\n \"tokenization_method\": null\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 \"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 \"source\": {\n \"id\": \"card_NORMALIZED00000000000002\",\n \"object\": \"card\",\n \"address_city\": \"Pacific\",\n \"address_country\": \"United States\",\n \"address_line1\": \"Under the sea,\",\n \"address_line1_check\": \"pass\",\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": \"33333\",\n \"address_zip_check\": \"pass\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\n \"metadata\": {\n },\n \"name\": \"Ada Starr\",\n \"tokenization_method\": null\n },\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_NORMALIZED00000000000001\",\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\": \"Pacific\",\n \"country\": \"United States\",\n \"line1\": \"Under the sea,\",\n \"line2\": null,\n \"postal_code\": \"33333\",\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Ada Starr\",\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_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\": 38,\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\": \"card_NORMALIZED00000000000002\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": \"pass\",\n \"address_postal_code_check\": \"pass\",\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\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\": {\n \"id\": \"card_NORMALIZED00000000000002\",\n \"object\": \"card\",\n \"address_city\": \"Pacific\",\n \"address_country\": \"United States\",\n \"address_line1\": \"Under the sea,\",\n \"address_line1_check\": \"pass\",\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": \"33333\",\n \"address_zip_check\": \"pass\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\n \"metadata\": {\n },\n \"name\": \"Ada Starr\",\n \"tokenization_method\": null\n },\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_NORMALIZED00000000000001\"\n },\n \"client_secret\": \"pi_NORMALIZED00000000000001_secret_HnG1WHH5Lq8sSIQEgu5DgsxBW\",\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 \"source\": {\n \"id\": \"card_NORMALIZED00000000000002\",\n \"object\": \"card\",\n \"address_city\": \"Pacific\",\n \"address_country\": \"United States\",\n \"address_line1\": \"Under the sea,\",\n \"address_line1_check\": \"pass\",\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": \"33333\",\n \"address_zip_check\": \"pass\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\n \"metadata\": {\n },\n \"name\": \"Ada Starr\",\n \"tokenization_method\": null\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 \"source\": {\n \"id\": \"card_NORMALIZED00000000000002\",\n \"object\": \"card\",\n \"address_city\": \"Pacific\",\n \"address_country\": \"United States\",\n \"address_line1\": \"Under the sea,\",\n \"address_line1_check\": \"pass\",\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": \"33333\",\n \"address_zip_check\": \"pass\",\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_NORMALIZED0001\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 3,\n \"exp_year\": 2033,\n \"fingerprint\": \"NORMALIZED000002\",\n \"funding\": \"credit\",\n \"last4\": \"0341\",\n \"metadata\": {\n },\n \"name\": \"Ada Starr\",\n \"tokenization_method\": null\n },\n \"type\": \"card_error\"\n }\n}\n",
"http_status": 402,
"json_body": {
"error": {
@@ -41,6 +275,7 @@
"data": [
{
"amount": 5000,
+ "amount_captured": 0,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -59,13 +294,15 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "Stripe",
"captured": false,
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
- "description": "Payment for invoice FF56B020-0002",
+ "description": "Payment for Invoice",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": "card_declined",
"failure_message": "Your card was declined.",
"fraud_details": {},
@@ -85,7 +322,7 @@
"type": "issuer_declined"
},
"paid": false,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_method": "card_NORMALIZED00000000000002",
"payment_method_details": {
"card": {
@@ -100,15 +337,17 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000002",
"funding": "credit",
+ "installments": null,
"last4": "0341",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
- "receipt_email": "[email protected]",
+ "receipt_email": null,
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000002/rcpt_NORMALIZED000000000000000000002",
+ "receipt_url": null,
"refunded": false,
"refunds": {
"data": [],
@@ -155,15 +394,15 @@
"has_more": false,
"object": "list",
"total_count": 1,
- "url": "/v1/charges?payment_intent=pi_1F96BhGh0CmXqmnwXdcsnxHY"
+ "url": "/v1/charges?payment_intent=pi_NORMALIZED00000000000001"
},
- "client_secret": "pi_1F96BhGh0CmXqmnwXdcsnxHY_secret_Nl29CEFAEgp65EZvfiNxjnetP",
+ "client_secret": "pi_NORMALIZED00000000000001_secret_HnG1WHH5Lq8sSIQEgu5DgsxBW",
"confirmation_method": "automatic",
"created": 1000000000,
"currency": "usd",
"customer": "cus_NORMALIZED0001",
- "description": "Payment for invoice FF56B020-0002",
- "id": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "description": "Payment for Invoice",
+ "id": "pi_NORMALIZED00000000000001",
"invoice": "in_NORMALIZED00000000000002",
"last_payment_error": {
"charge": "ch_NORMALIZED00000000000002",
@@ -206,6 +445,8 @@
"payment_method": null,
"payment_method_options": {
"card": {
+ "installments": null,
+ "network": null,
"request_three_d_secure": "automatic"
}
},
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
index 640992725d5..a39e5205ffe 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--Invoice.pay.2.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 5000,
"amount_paid": 5000,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 1,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": "ch_NORMALIZED00000000000003",
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000002/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HhjrT/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 5000,
"currency": "usd",
"description": null,
+ "discount_amounts": [],
"discountable": true,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 5000,
+ "unit_amount_decimal": "5000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -69,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": true,
- "payment_intent": "pi_1F96BhGh0CmXqmnwXdcsnxHY",
+ "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": null,
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 5000,
"tax": null,
- "tax_percent": 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
index 99477bab140..f722b040756 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"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,
+ "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": -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
index d4270a431e2..3f346515e5e 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.2.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1000000000
},
"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,
+ "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": 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
index 0707fe4c36c..6812d3e0ce0 100644
--- a/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/replace_payment_source--InvoiceItem.create.3.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": null,
"discountable": true,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"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,
+ "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": 5000,
+ "unit_amount_decimal": "5000"
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Charge.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Charge.create.1.json
index ec20193c31f..cccdeed3263 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 4800,
+ "amount_captured": 4800,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,7 +19,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -109,7 +110,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"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--Customer.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.create.1.json
index 1e87c2923cd..88d5c69190f 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,54 +26,5 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 17d00481138..3d384443cbd 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -84,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.1.json
index e9e1cfb02cd..73930ab9c61 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.1.json
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"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": 4800,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGmnU3Nexq",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqrQVq8e30wd",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,15 +83,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxjcmXQWz"
+ "type": "invoiceitem"
},
{
"amount": -4800,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -100,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGPP6MRxVi",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqIz3JTQJXqm",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -119,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxqc69b7U"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -131,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -152,8 +164,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.2.json
index b8feafbb7c5..0923f62afad 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.2.json
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 11200,
"amount_paid": 0,
"amount_remaining": 11200,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"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": 11200,
"currency": "usd",
"description": "Additional license (Jan 2, 2012 - Feb 2, 2012)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2PD2X8vgpBNGi2WCVoxN",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqbn9E3BYkUq",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2PD2X8vgpBNGWj7t13XB"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -89,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 11200,
"tax": null,
- "tax_percent": null,
"total": 11200,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.3.json
index c6b5486c58c..456a0267ae4 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.3.json
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 200000,
"amount_paid": 0,
"amount_remaining": 200000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"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": 40000,
"currency": "usd",
"description": "Additional license (Feb 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2SD2X8vgpBNGDJwXOc3b",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqxNSx9MHbPC",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,15 +83,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2SD2X8vgpBNGlalvG9cv"
+ "type": "invoiceitem"
},
{
"amount": 160000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -100,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2RD2X8vgpBNGanjAQMpk",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOquKicbsnEfk",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -119,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2RD2X8vgpBNGgza03wZ5"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -131,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0003",
+ "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 Standard",
@@ -152,8 +164,8 @@
"subscription": null,
"subtotal": 200000,
"tax": null,
- "tax_percent": null,
"total": 200000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.4.json
index 50ee2d31457..4d5f1378680 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.4.json
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 36830,
"amount_paid": 0,
"amount_remaining": 36830,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000004",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 36830,
"currency": "usd",
"description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000006",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2VD2X8vgpBNGa0BY3luD",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqPUFMHEL03U",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2VD2X8vgpBNGbpLwsVBN"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -89,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0004",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 36830,
"tax": null,
- "tax_percent": null,
"total": 36830,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.5.json
index c0bfcaec063..971e5617a6d 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.5.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.create.5.json
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 240000,
"amount_paid": 0,
"amount_remaining": 240000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000005",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 240000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000007",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000007",
"invoice_item": "ii_NORMALIZED00000000000007",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2XD2X8vgpBNGamMRrAgW",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqc8FlpLiZkO",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2XD2X8vgpBNGlycTk5fw"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -89,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0005",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 240000,
"tax": null,
- "tax_percent": null,
"total": 240000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 453181d7266..46081635658 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 4800,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGmnU3Nexq",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqrQVq8e30wd",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,15 +83,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxjcmXQWz"
+ "type": "invoiceitem"
},
{
"amount": -4800,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -100,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGPP6MRxVi",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqIz3JTQJXqm",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -119,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxqc69b7U"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -133,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -152,8 +164,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 9180702c2eb..6f2442d53cd 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 11200,
"amount_paid": 0,
"amount_remaining": 11200,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 11200,
"currency": "usd",
"description": "Additional license (Jan 2, 2012 - Feb 2, 2012)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2PD2X8vgpBNGi2WCVoxN",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqbn9E3BYkUq",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2PD2X8vgpBNGWj7t13XB"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -91,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2RD2X8vgpBNGtEBCkF9Z",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 11200,
"tax": null,
- "tax_percent": null,
"total": 11200,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 b7a42a7662b..eed7cd4b158 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 200000,
"amount_paid": 0,
"amount_remaining": 200000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 40000,
"currency": "usd",
"description": "Additional license (Feb 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2SD2X8vgpBNGDJwXOc3b",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqxNSx9MHbPC",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,15 +83,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2SD2X8vgpBNGlalvG9cv"
+ "type": "invoiceitem"
},
{
"amount": 160000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -100,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2RD2X8vgpBNGanjAQMpk",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOquKicbsnEfk",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -119,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2RD2X8vgpBNGgza03wZ5"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -133,12 +139,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2TD2X8vgpBNGI7xPlRLT",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -152,8 +164,8 @@
"subscription": null,
"subtotal": 200000,
"tax": null,
- "tax_percent": null,
"total": 200000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 432094cc1ed..612cdb801b6 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 36830,
"amount_paid": 0,
"amount_remaining": 36830,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004izTRV",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004DQYsz",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004izTRV/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004DQYsz/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 36830,
"currency": "usd",
"description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000006",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2VD2X8vgpBNGa0BY3luD",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqPUFMHEL03U",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2VD2X8vgpBNGbpLwsVBN"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -91,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0004",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2WD2X8vgpBNGdKVWsvEL",
+ "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": "Zulip Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 36830,
"tax": null,
- "tax_percent": null,
"total": 36830,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 a5d35eb4892..e9aa908a1b0 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 240000,
"amount_paid": 0,
"amount_remaining": 240000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005DACfs",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005uuk0y",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005DACfs/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005uuk0y/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 240000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000007",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000007",
"invoice_item": "ii_NORMALIZED00000000000007",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2XD2X8vgpBNGamMRrAgW",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqc8FlpLiZkO",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2XD2X8vgpBNGlycTk5fw"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -91,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0005",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2ZD2X8vgpBNGWgT2rokR",
+ "payment_intent": "pi_NORMALIZED00000000000004",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 240000,
"tax": null,
- "tax_percent": null,
"total": 240000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.1.json
index 0d1b946bd9c..cfd1ee25d70 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--Invoice.list.1.json
@@ -3,14 +3,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 200000,
"amount_paid": 0,
"amount_remaining": 200000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -25,27 +29,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 40000,
"currency": "usd",
"description": "Additional license (Feb 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -60,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2SD2X8vgpBNGDJwXOc3b",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqxNSx9MHbPC",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -79,15 +85,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2SD2X8vgpBNGlalvG9cv"
+ "type": "invoiceitem"
},
{
"amount": 160000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -102,13 +109,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2RD2X8vgpBNGanjAQMpk",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOquKicbsnEfk",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -121,8 +128,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2RD2X8vgpBNGgza03wZ5"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -135,12 +141,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2TD2X8vgpBNGI7xPlRLT",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -154,8 +166,8 @@
"subscription": null,
"subtotal": 200000,
"tax": null,
- "tax_percent": null,
"total": 200000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -163,14 +175,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 11200,
"amount_paid": 0,
"amount_remaining": 11200,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -185,27 +201,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 11200,
"currency": "usd",
"description": "Additional license (Jan 2, 2012 - Feb 2, 2012)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -220,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2PD2X8vgpBNGi2WCVoxN",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqbn9E3BYkUq",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -239,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2PD2X8vgpBNGWj7t13XB"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -253,12 +270,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2RD2X8vgpBNGtEBCkF9Z",
+ "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 Standard",
@@ -272,8 +295,8 @@
"subscription": null,
"subtotal": 11200,
"tax": null,
- "tax_percent": null,
"total": 11200,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -281,14 +304,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -303,27 +330,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 4800,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -338,13 +367,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGmnU3Nexq",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqrQVq8e30wd",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -357,15 +386,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxjcmXQWz"
+ "type": "invoiceitem"
},
{
"amount": -4800,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -380,13 +410,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGPP6MRxVi",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqIz3JTQJXqm",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -399,8 +429,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxqc69b7U"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -413,12 +442,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -432,8 +467,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 52e883d852c..4ef3e16fb4b 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
@@ -3,14 +3,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 36830,
"amount_paid": 0,
"amount_remaining": 36830,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -25,27 +29,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004izTRV",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004DQYsz",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004izTRV/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004DQYsz/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 36830,
"currency": "usd",
"description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000006",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -60,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2VD2X8vgpBNGa0BY3luD",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqPUFMHEL03U",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -79,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2VD2X8vgpBNGbpLwsVBN"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -93,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0004",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2WD2X8vgpBNGdKVWsvEL",
+ "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": "Zulip Standard",
@@ -112,8 +123,8 @@
"subscription": null,
"subtotal": 36830,
"tax": null,
- "tax_percent": null,
"total": 36830,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -121,14 +132,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 200000,
"amount_paid": 0,
"amount_remaining": 200000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -143,27 +158,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 40000,
"currency": "usd",
"description": "Additional license (Feb 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -178,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2SD2X8vgpBNGDJwXOc3b",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqxNSx9MHbPC",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -197,15 +214,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2SD2X8vgpBNGlalvG9cv"
+ "type": "invoiceitem"
},
{
"amount": 160000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -220,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2RD2X8vgpBNGanjAQMpk",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOquKicbsnEfk",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -239,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2RD2X8vgpBNGgza03wZ5"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -253,12 +270,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2TD2X8vgpBNGI7xPlRLT",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -272,8 +295,8 @@
"subscription": null,
"subtotal": 200000,
"tax": null,
- "tax_percent": null,
"total": 200000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -281,14 +304,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 11200,
"amount_paid": 0,
"amount_remaining": 11200,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -303,27 +330,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 11200,
"currency": "usd",
"description": "Additional license (Jan 2, 2012 - Feb 2, 2012)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -338,13 +367,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2PD2X8vgpBNGi2WCVoxN",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqbn9E3BYkUq",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -357,8 +386,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2PD2X8vgpBNGWj7t13XB"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -371,12 +399,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2RD2X8vgpBNGtEBCkF9Z",
+ "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 Standard",
@@ -390,8 +424,8 @@
"subscription": null,
"subtotal": 11200,
"tax": null,
- "tax_percent": null,
"total": 11200,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -399,14 +433,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -421,27 +459,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 4800,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -456,13 +496,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGmnU3Nexq",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqrQVq8e30wd",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -475,15 +515,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxjcmXQWz"
+ "type": "invoiceitem"
},
{
"amount": -4800,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -498,13 +539,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGPP6MRxVi",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqIz3JTQJXqm",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -517,8 +558,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxqc69b7U"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -531,12 +571,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -550,8 +596,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 9f949ec1c92..bc50ee5c03b 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
@@ -3,14 +3,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 240000,
"amount_paid": 0,
"amount_remaining": 240000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -25,27 +29,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005DACfs",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005uuk0y",
"id": "in_NORMALIZED00000000000005",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005DACfs/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000005uuk0y/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 240000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000007",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000007",
"invoice_item": "ii_NORMALIZED00000000000007",
"livemode": false,
"metadata": {},
@@ -60,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2XD2X8vgpBNGamMRrAgW",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqc8FlpLiZkO",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -79,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2XD2X8vgpBNGlycTk5fw"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -93,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0005",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2ZD2X8vgpBNGWgT2rokR",
+ "payment_intent": "pi_NORMALIZED00000000000004",
+ "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 Standard",
@@ -112,8 +123,8 @@
"subscription": null,
"subtotal": 240000,
"tax": null,
- "tax_percent": null,
"total": 240000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -121,14 +132,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 36830,
"amount_paid": 0,
"amount_remaining": 36830,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -143,27 +158,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004izTRV",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004DQYsz",
"id": "in_NORMALIZED00000000000004",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004izTRV/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000004DQYsz/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 36830,
"currency": "usd",
"description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000006",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000006",
"invoice_item": "ii_NORMALIZED00000000000006",
"livemode": false,
"metadata": {},
@@ -178,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2VD2X8vgpBNGa0BY3luD",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqPUFMHEL03U",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -197,8 +214,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2VD2X8vgpBNGbpLwsVBN"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -211,12 +227,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0004",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2WD2X8vgpBNGdKVWsvEL",
+ "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": "Zulip Standard",
@@ -230,8 +252,8 @@
"subscription": null,
"subtotal": 36830,
"tax": null,
- "tax_percent": null,
"total": 36830,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -239,14 +261,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 200000,
"amount_paid": 0,
"amount_remaining": 200000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -261,27 +287,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003NiCvS/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003RcbKD/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 40000,
"currency": "usd",
"description": "Additional license (Feb 2, 2012 - Feb 2, 2013)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -296,13 +324,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2SD2X8vgpBNGDJwXOc3b",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqxNSx9MHbPC",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -315,15 +343,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2SD2X8vgpBNGlalvG9cv"
+ "type": "invoiceitem"
},
{
"amount": 160000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000005",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000005",
"invoice_item": "ii_NORMALIZED00000000000005",
"livemode": false,
"metadata": {},
@@ -338,13 +367,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2RD2X8vgpBNGanjAQMpk",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOquKicbsnEfk",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -357,8 +386,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2RD2X8vgpBNGgza03wZ5"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -371,12 +399,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2TD2X8vgpBNGI7xPlRLT",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -390,8 +424,8 @@
"subscription": null,
"subtotal": 200000,
"tax": null,
- "tax_percent": null,
"total": 200000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -399,14 +433,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 11200,
"amount_paid": 0,
"amount_remaining": 11200,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -421,27 +459,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002BzaWK/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002tFPYq/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 11200,
"currency": "usd",
"description": "Additional license (Jan 2, 2012 - Feb 2, 2012)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -456,13 +496,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2PD2X8vgpBNGi2WCVoxN",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqbn9E3BYkUq",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -475,8 +515,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2PD2X8vgpBNGWj7t13XB"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -489,12 +528,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ2RD2X8vgpBNGtEBCkF9Z",
+ "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 Standard",
@@ -508,8 +553,8 @@
"subscription": null,
"subtotal": 11200,
"tax": null,
- "tax_percent": null,
"total": 11200,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -517,14 +562,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -539,27 +588,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001sXXeo/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001c9NkE/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 4800,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -574,13 +625,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGmnU3Nexq",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqrQVq8e30wd",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -593,15 +644,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxjcmXQWz"
+ "type": "invoiceitem"
},
{
"amount": -4800,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -616,13 +668,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGPP6MRxVi",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqIz3JTQJXqm",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -635,8 +687,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2MD2X8vgpBNGxqc69b7U"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -649,12 +700,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -668,8 +725,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.1.json
index 1704e35403d..4ffd2a77d92 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGPP6MRxVi",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqIz3JTQJXqm",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.2.json
index 7e972e9ed81..7c21fa33199 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.2.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2MD2X8vgpBNGmnU3Nexq",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqrQVq8e30wd",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.3.json
index 85dfd73948f..df781a6bf92 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.3.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Additional license (Jan 2, 2012 - Feb 2, 2012)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2PD2X8vgpBNGi2WCVoxN",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqbn9E3BYkUq",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.4.json
index 4df7018f01f..e984120548e 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.4.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000005",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2RD2X8vgpBNGanjAQMpk",
+ "id": "price_NORMALIZED00000000000005",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOquKicbsnEfk",
+ "product": "prod_NORMALIZED0005",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.5.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.5.json
index b339b156709..6fcb44d187d 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.5.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.5.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Additional license (Feb 2, 2012 - Feb 2, 2013)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000004",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2SD2X8vgpBNGDJwXOc3b",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqxNSx9MHbPC",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.6.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.6.json
index be232f9485d..a11e2a56ef2 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.6.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.6.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Additional license (Mar 2, 2012 - Feb 2, 2013)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000006",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2VD2X8vgpBNGa0BY3luD",
+ "id": "price_NORMALIZED00000000000006",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqPUFMHEL03U",
+ "product": "prod_NORMALIZED0006",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.7.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.7.json
index d9dc8e90605..41c8bd7b139 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.7.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_automatic_license_management--InvoiceItem.create.7.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000007",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2XD2X8vgpBNGamMRrAgW",
+ "id": "price_NORMALIZED00000000000007",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqc8FlpLiZkO",
+ "product": "prod_NORMALIZED0007",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Charge.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Charge.create.1.json
index 047eb12da3d..d104330f0e4 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 28000,
+ "amount_captured": 28000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,7 +19,7 @@
"name": "Ada Starr",
"phone": null
},
- "calculated_statement_descriptor": "ZULIP STANDARD",
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -109,7 +110,7 @@
},
"source_transfer": null,
"statement_descriptor": "Zulip Standard",
- "statement_descriptor_suffix": null,
+ "statement_descriptor_suffix": "Zulip Standard",
"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--Customer.create.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.create.1.json
index 1e87c2923cd..88d5c69190f 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,54 +26,5 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 17d00481138..3d384443cbd 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
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -84,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 1340fa41dbf..c2745002eb4 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"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": 28000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGDaM7ljiA",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqmw9b9tkVwI",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,15 +83,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNGBFITf66k"
+ "type": "invoiceitem"
},
{
"amount": -28000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -100,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGqrPfeYwv",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnKCoreROal",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -119,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNG6lkEsKdb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -131,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -152,8 +164,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 4ebf520a9ac..f0a36f16700 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"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": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ33D2X8vgpBNG2TI3HOsm",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqHbrO8DnCsf",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ33D2X8vgpBNGO728kgr0"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -89,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 81e2f6dda8a..5265de6b717 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"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": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ35D2X8vgpBNGxxsMtJzq",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnsmnQwOxKS",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ35D2X8vgpBNGRUNA2sh6"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -89,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0003",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 2c353ac873d..1dbe8402ecb 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001w996I",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001eoy5M",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001w996I/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001eoy5M/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 28000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGDaM7ljiA",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqmw9b9tkVwI",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,15 +83,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNGBFITf66k"
+ "type": "invoiceitem"
},
{
"amount": -28000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -100,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGqrPfeYwv",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnKCoreROal",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -119,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNG6lkEsKdb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -133,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -152,8 +164,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 02e6c388149..516f5667b93 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002wWqyj",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002A8nya",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002wWqyj/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002A8nya/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ33D2X8vgpBNG2TI3HOsm",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqHbrO8DnCsf",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ33D2X8vgpBNGO728kgr0"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -91,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ34D2X8vgpBNGW2flNzcq",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 ae889f9cd97..c8c04114835 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
@@ -1,14 +1,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -23,27 +27,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003r9OM2",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000032usLo",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003r9OM2/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000032usLo/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -58,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ35D2X8vgpBNGxxsMtJzq",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnsmnQwOxKS",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -77,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ35D2X8vgpBNGRUNA2sh6"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -91,12 +96,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ37D2X8vgpBNGPnEnueSu",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -110,8 +121,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
diff --git a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.1.json b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.1.json
index f5030262039..de545b70e3d 100644
--- a/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/switch_from_monthly_plan_to_annual_plan_for_manual_license_management--Invoice.list.1.json
@@ -3,14 +3,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -25,27 +29,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002wWqyj",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002A8nya",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002wWqyj/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002A8nya/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -60,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ33D2X8vgpBNG2TI3HOsm",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqHbrO8DnCsf",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -79,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ33D2X8vgpBNGO728kgr0"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -93,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ34D2X8vgpBNGW2flNzcq",
+ "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 Standard",
@@ -112,8 +123,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -121,14 +132,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -143,27 +158,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001w996I",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001eoy5M",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001w996I/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001eoy5M/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 28000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -178,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGDaM7ljiA",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqmw9b9tkVwI",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -197,15 +214,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNGBFITf66k"
+ "type": "invoiceitem"
},
{
"amount": -28000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -220,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGqrPfeYwv",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnKCoreROal",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -239,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNG6lkEsKdb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -253,12 +270,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -272,8 +295,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 ad6f6b03658..88b4cc624ea 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
@@ -3,14 +3,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -25,27 +29,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003r9OM2",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000032usLo",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003r9OM2/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000032usLo/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000004",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -60,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ35D2X8vgpBNGxxsMtJzq",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnsmnQwOxKS",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -79,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ35D2X8vgpBNGRUNA2sh6"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -93,12 +98,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ37D2X8vgpBNGPnEnueSu",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -112,8 +123,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -121,14 +132,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 280000,
"amount_paid": 0,
"amount_remaining": 280000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -143,27 +158,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002wWqyj",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002A8nya",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002wWqyj/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002A8nya/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 280000,
"currency": "usd",
"description": "Zulip Standard - renewal",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000003",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -178,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ33D2X8vgpBNG2TI3HOsm",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqHbrO8DnCsf",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -197,8 +214,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ33D2X8vgpBNGO728kgr0"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -211,12 +227,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1GvQ34D2X8vgpBNGW2flNzcq",
+ "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 Standard",
@@ -230,8 +252,8 @@
"subscription": null,
"subtotal": 280000,
"tax": null,
- "tax_percent": null,
"total": 280000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
@@ -239,14 +261,18 @@
{
"account_country": "US",
"account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -261,27 +287,29 @@
"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": null,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001w996I",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001eoy5M",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001w996I/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001eoy5M/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 28000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -296,13 +324,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGDaM7ljiA",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqmw9b9tkVwI",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -315,15 +343,16 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNGBFITf66k"
+ "type": "invoiceitem"
},
{
"amount": -28000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -338,13 +367,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGqrPfeYwv",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnKCoreROal",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -357,8 +386,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1GvQ2zD2X8vgpBNG6lkEsKdb"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -371,12 +399,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -390,8 +424,8 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
"webhooks_delivered_at": 1000000000
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 5c373505530..146cb93250c 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGqrPfeYwv",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnKCoreROal",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": 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 131e4a36076..d3305507d6a 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ2zD2X8vgpBNGDaM7ljiA",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqmw9b9tkVwI",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": 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 1fc7a4ff419..4ac8751ad47 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000003",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ33D2X8vgpBNG2TI3HOsm",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqHbrO8DnCsf",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": 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 594d8b35eef..de41160cfe2 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard - renewal",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000004",
"invoice": null,
"livemode": false,
@@ -20,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1GvQ35D2X8vgpBNGxxsMtJzq",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_HUOqnsmnQwOxKS",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.create.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.create.1.json
index 24c4bc8fe17..730ed973b02 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,28 +26,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.1.json
index d3b72bc2df2..a38ce33448a 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -122,21 +121,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.2.json
index 339c1869f6f..b0368c52b18 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Customer.retrieve.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -122,21 +121,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.1.json
index 23cf5ddbb88..b33e97dafac 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.1.json
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 800000,
"amount_paid": 0,
"amount_remaining": 800000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRVD2X8vgpBNG9esQtj8L",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbekBbBgKxfBl",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRVD2X8vgpBNGvl4i8eac"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -94,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -115,10 +121,9 @@
"subscription": null,
"subtotal": 800000,
"tax": null,
- "tax_percent": null,
"total": 800000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.2.json
index d942e8a039f..0e4a8acb9e8 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.2.json
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 1600000,
"amount_paid": 0,
"amount_remaining": 1600000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000002",
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGCflF8VYB",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbeh61pACCNHE",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGIYfu4anF"
+ "type": "invoiceitem"
},
{
"amount": 400000,
@@ -92,7 +92,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -107,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGaGRmF77j",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbe1Gr2iiwoWB",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -126,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGdmBXG8v1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -138,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "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 Standard",
@@ -159,10 +164,9 @@
"subscription": null,
"subtotal": 1600000,
"tax": null,
- "tax_percent": null,
"total": 1600000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.3.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.3.json
index b933e664789..358f3c401cb 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.3.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--Invoice.create.3.json
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 960000,
"amount_paid": 0,
"amount_remaining": 960000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000003",
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRbD2X8vgpBNGYPSjBZYZ",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbeRrNHvhUjov",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRbD2X8vgpBNG6KqjtrC3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -94,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0003",
+ "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 Standard",
@@ -115,10 +121,9 @@
"subscription": null,
"subtotal": 960000,
"tax": null,
- "tax_percent": null,
"total": 960000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 13dd03b7f0e..28d37b94b66 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 800000,
"amount_paid": 0,
"amount_remaining": 800000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001cSL6o",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED000000000000000144WpC",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001cSL6o/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000144WpC/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRVD2X8vgpBNG9esQtj8L",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbekBbBgKxfBl",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRVD2X8vgpBNGvl4i8eac"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -96,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRWD2X8vgpBNGn1bBebXw",
+ "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 Standard",
@@ -115,7 +121,6 @@
"subscription": null,
"subtotal": 800000,
"tax": null,
- "tax_percent": null,
"total": 800000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 fc6cf87f23a..0580ef77d38 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 1600000,
"amount_paid": 0,
"amount_remaining": 1600000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002GLqJZ",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002SO455",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002GLqJZ/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002SO455/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGCflF8VYB",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbeh61pACCNHE",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGIYfu4anF"
+ "type": "invoiceitem"
},
{
"amount": 400000,
@@ -92,7 +92,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -107,13 +107,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGaGRmF77j",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbe1Gr2iiwoWB",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -126,8 +126,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGdmBXG8v1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -140,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRaD2X8vgpBNGr7FXPbXU",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -159,10 +164,9 @@
"subscription": null,
"subtotal": 1600000,
"tax": null,
- "tax_percent": null,
"total": 1600000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 ff8ec5a64e0..20f641d9db9 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
@@ -1,15 +1,18 @@
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 960000,
"amount_paid": 0,
"amount_remaining": 960000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -24,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -33,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003vYywT",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ERSJR",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003vYywT/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ERSJR/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -48,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -63,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRbD2X8vgpBNGYPSjBZYZ",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbeRrNHvhUjov",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -82,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRbD2X8vgpBNG6KqjtrC3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -96,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRdD2X8vgpBNGJzS4K4wk",
+ "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": "Zulip Standard",
@@ -115,10 +121,9 @@
"subscription": null,
"subtotal": 960000,
"tax": null,
- "tax_percent": null,
"total": 960000,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 aca4b1dc899..ae5e402725b 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
@@ -2,16 +2,19 @@
"data": [
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 1600000,
"amount_paid": 0,
"amount_remaining": 1600000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -35,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002GLqJZ",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002SO455",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002GLqJZ/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002SO455/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -50,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -65,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGCflF8VYB",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbeh61pACCNHE",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -84,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGIYfu4anF"
+ "type": "invoiceitem"
},
{
"amount": 400000,
@@ -94,7 +94,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -109,13 +109,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGaGRmF77j",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbe1Gr2iiwoWB",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -128,8 +128,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGdmBXG8v1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -142,12 +141,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRaD2X8vgpBNGr7FXPbXU",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -161,7 +166,6 @@
"subscription": null,
"subtotal": 1600000,
"tax": null,
- "tax_percent": null,
"total": 1600000,
"total_discount_amounts": [],
"total_tax_amounts": [],
@@ -170,16 +174,19 @@
},
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 800000,
"amount_paid": 0,
"amount_remaining": 800000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -194,7 +201,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -203,11 +209,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001cSL6o",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED000000000000000144WpC",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001cSL6o/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000144WpC/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -218,7 +223,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -233,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRVD2X8vgpBNG9esQtj8L",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbekBbBgKxfBl",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -252,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRVD2X8vgpBNGvl4i8eac"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -266,12 +270,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRWD2X8vgpBNGn1bBebXw",
+ "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 Standard",
@@ -285,7 +295,6 @@
"subscription": null,
"subtotal": 800000,
"tax": null,
- "tax_percent": null,
"total": 800000,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 8cc6f816320..22b5e0f33d0 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
@@ -2,16 +2,19 @@
"data": [
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 960000,
"amount_paid": 0,
"amount_remaining": 960000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -26,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -35,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003vYywT",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ERSJR",
"id": "in_NORMALIZED00000000000003",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003vYywT/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000003ERSJR/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -50,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000004",
+ "id": "il_NORMALIZED00000000000004",
"invoice_item": "ii_NORMALIZED00000000000004",
"livemode": false,
"metadata": {},
@@ -65,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRbD2X8vgpBNGYPSjBZYZ",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbeRrNHvhUjov",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -84,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRbD2X8vgpBNG6KqjtrC3"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0003",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRdD2X8vgpBNGJzS4K4wk",
+ "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": "Zulip Standard",
@@ -117,7 +123,6 @@
"subscription": null,
"subtotal": 960000,
"tax": null,
- "tax_percent": null,
"total": 960000,
"total_discount_amounts": [],
"total_tax_amounts": [],
@@ -126,16 +131,19 @@
},
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 1600000,
"amount_paid": 0,
"amount_remaining": 1600000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -150,7 +158,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -159,11 +166,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002GLqJZ",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002SO455",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002GLqJZ/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002SO455/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -174,7 +180,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -189,13 +195,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGCflF8VYB",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbeh61pACCNHE",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -208,8 +214,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGIYfu4anF"
+ "type": "invoiceitem"
},
{
"amount": 400000,
@@ -218,7 +223,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000003",
+ "id": "il_NORMALIZED00000000000003",
"invoice_item": "ii_NORMALIZED00000000000003",
"livemode": false,
"metadata": {},
@@ -233,13 +238,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGaGRmF77j",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbe1Gr2iiwoWB",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -252,8 +257,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRYD2X8vgpBNGdmBXG8v1"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -266,12 +270,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0002",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRaD2X8vgpBNGr7FXPbXU",
+ "payment_intent": "pi_NORMALIZED00000000000002",
+ "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 Standard",
@@ -285,7 +295,6 @@
"subscription": null,
"subtotal": 1600000,
"tax": null,
- "tax_percent": null,
"total": 1600000,
"total_discount_amounts": [],
"total_tax_amounts": [],
@@ -294,16 +303,19 @@
},
{
"account_country": "US",
- "account_name": "Vishnu Test",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 800000,
"amount_paid": 0,
"amount_remaining": 800000,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -318,7 +330,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -327,11 +338,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001cSL6o",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED000000000000000144WpC",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001cSL6o/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED000000000000000144WpC/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -342,7 +352,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -357,13 +367,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRVD2X8vgpBNG9esQtj8L",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbekBbBgKxfBl",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -376,8 +386,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1I2KRVD2X8vgpBNGvl4i8eac"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -390,12 +399,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1I2KRWD2X8vgpBNGn1bBebXw",
+ "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 Standard",
@@ -409,7 +424,6 @@
"subscription": null,
"subtotal": 800000,
"tax": null,
- "tax_percent": null,
"total": 800000,
"total_discount_amounts": [],
"total_tax_amounts": [],
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.1.json
index 5be38cb892d..a5e7f5fe0ca 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.1.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRVD2X8vgpBNG9esQtj8L",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbekBbBgKxfBl",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.2.json
index a944f0f9573..ccca30b2507 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.2.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGaGRmF77j",
+ "id": "price_NORMALIZED00000000000003",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbe1Gr2iiwoWB",
+ "product": "prod_NORMALIZED0003",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.3.json
index e28e66e42c8..8c73b385ff3 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.3.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.3.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRYD2X8vgpBNGCflF8VYB",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_Idbeh61pACCNHE",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.4.json
index 0e06eeb114a..d33163548c5 100644
--- a/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.4.json
+++ b/corporate/tests/stripe_fixtures/update_licenses_of_manual_plan_from_billing_page--InvoiceItem.create.4.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1I2KRbD2X8vgpBNGYPSjBZYZ",
+ "id": "price_NORMALIZED00000000000004",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_IdbeRrNHvhUjov",
+ "product": "prod_NORMALIZED0004",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.create.1.json
index abbe645d532..180168b4615 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,6 +19,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1010000001,
"currency": "usd",
@@ -25,6 +27,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -59,7 +62,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
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 b3bbff411e6..4c471240bcc 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
@@ -2,6 +2,7 @@
"data": [
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -20,6 +21,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1010000001,
"currency": "usd",
@@ -27,6 +29,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -61,7 +64,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
@@ -71,7 +76,13 @@
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
"shipping": null,
"source": {
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 4a09519f0df..236cba3ab05 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,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000002,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 a605a1b4ced..ebf57e16d5d 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,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000002,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 2,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 a605a1b4ced..ebf57e16d5d 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,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000002,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 2,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
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 1a9ea581730..a3990fb986e 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -89,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 9aa70f9a62e..f85aa35cc69 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001TL8aa",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001TL8aa/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -91,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.1.json
index e4d990c4fc3..ac87099084f 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card--Invoice.list.1.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001TL8aa",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001TL8aa/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 48000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 6,
"subscription": null,
@@ -64,8 +91,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -75,6 +104,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -93,12 +141,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -112,9 +166,10 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 99477bab140..cf52be404dc 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "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": -48000,
+ "unit_amount_decimal": "-48000"
}
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 b79216ebdc0..c1f41cd06f3 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "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": 8000,
+ "unit_amount_decimal": "8000"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.create.1.json
index abbe645d532..180168b4615 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Charge.create.1.json
@@ -1,5 +1,6 @@
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,6 +19,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1010000001,
"currency": "usd",
@@ -25,6 +27,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -59,7 +62,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
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 b3bbff411e6..4c471240bcc 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
@@ -2,6 +2,7 @@
"data": [
{
"amount": 48000,
+ "amount_captured": 48000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -20,6 +21,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1010000001,
"currency": "usd",
@@ -27,6 +29,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -61,7 +64,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
@@ -71,7 +76,13 @@
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000001",
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
"shipping": null,
"source": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.create.1.json
index 4a09519f0df..236cba3ab05 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000002,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
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 d4674ad7ef4..33f7ccbcf74 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 136000,
"amount_paid": 0,
"amount_remaining": 136000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 184000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -89,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 136000,
"tax": null,
- "tax_percent": null,
"total": 136000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 e1d40aab367..e4bf0da1f91 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 136000,
"amount_paid": 0,
"amount_remaining": 136000,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001lRluC",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001lRluC/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 184000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -91,12 +139,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96C9Gh0CmXqmnwJHj8MzD0",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 136000,
"tax": null,
- "tax_percent": null,
"total": 136000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.1.json
index f10697d0a73..f791fad79c0 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Invoice.list.1.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 136000,
"amount_paid": 0,
"amount_remaining": 136000,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001lRluC",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001lRluC/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 184000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
@@ -64,8 +91,10 @@
"amount": -48000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -75,6 +104,25 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -48000,
+ "unit_amount_decimal": "-48000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -93,12 +141,18 @@
"next_payment_attempt": 1000000000,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96C9Gh0CmXqmnwJHj8MzD0",
+ "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 Standard",
@@ -112,9 +166,10 @@
"subscription": null,
"subtotal": 136000,
"tax": null,
- "tax_percent": null,
"total": 136000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
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 99477bab140..cf52be404dc 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000004,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000002",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0002",
+ "recurring": null,
+ "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": -48000,
+ "unit_amount_decimal": "-48000"
}
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 803ae7d6b8b..daddb9e6779 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
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1000000000
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000003,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
"tax_rates": [],
- "unit_amount": 8000
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Token.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Token.create.1.json
index b3a57bdccad..6281ac65afa 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Token.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count--Token.create.1.json
@@ -24,7 +24,7 @@
"tokenization_method": null
},
"client_ip": "0.0.0.0",
- "created": 1010000002,
+ "created": 1010000005,
"id": "tok_NORMALIZED00000000000001",
"livemode": false,
"object": "token",
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.create.1.json
index 923f3617b9c..51ee3ff9762 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -22,32 +21,10 @@
"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
+ "tax_exempt": "none"
}
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 ce47e7ae744..6ea816ef346 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
@@ -1,10 +1,52 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
"currency": "usd",
- "default_source": null,
+ "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": 1010000002,
+ "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,
@@ -22,32 +64,62 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 2,
"object": "customer",
"phone": null,
"preferred_locales": [],
"shipping": null,
"sources": {
- "data": [],
+ "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": 1010000002,
+ "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": 0,
+ "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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.2.json
index 855d38b2ec0..6ea816ef346 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--Customer.retrieve.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1010000001,
@@ -65,6 +64,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 2,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -121,21 +121,5 @@
"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
+ "tax_exempt": "none"
}
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 f734b8a8e46..4ff69f25139 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,11 +9,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000003,
+ "created": 1010000002,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000001,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
@@ -67,14 +94,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
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 389bfcf6472..07c16f132ee 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
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -8,11 +9,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000003,
+ "created": 1010000002,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001LW0pX",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001LW0pX/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000001,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
@@ -69,12 +96,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96CFGh0CmXqmnw3mAhOlHc",
+ "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 Standard",
@@ -88,8 +121,9 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
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 93430fbba4a..29b0ca6e5e4 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
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 984000,
"amount_paid": 0,
"amount_remaining": 984000,
@@ -10,11 +11,14 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "send_invoice",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
- "created": 1010000003,
+ "created": 1010000002,
"currency": "usd",
"custom_fields": null,
"customer": "cus_NORMALIZED0001",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001LW0pX",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001LW0pX/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 984000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000001,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
@@ -71,12 +98,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"object": "invoice",
+ "on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1F96CFGh0CmXqmnw3mAhOlHc",
+ "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 Standard",
@@ -90,9 +123,10 @@
"subscription": null,
"subtotal": 984000,
"tax": null,
- "tax_percent": null,
"total": 984000,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice--InvoiceItem.create.1.json
index 81ab7af590b..031df5bc519 100644
--- a/corporate/tests/stripe_fixtures/upgrade_by_invoice--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_by_invoice--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1325473445
},
"plan": null,
+ "price": {
+ "active": false,
+ "billing_scheme": "per_unit",
+ "created": 1010000001,
+ "currency": "usd",
+ "id": "price_NORMALIZED00000000000001",
+ "livemode": false,
+ "lookup_key": null,
+ "metadata": {},
+ "nickname": null,
+ "object": "price",
+ "product": "prod_NORMALIZED0001",
+ "recurring": null,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 123,
"subscription": null,
"tax_rates": [],
- "unit_amount": 8000
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.1.json
index e79aedfa050..650347743e1 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.1.json
@@ -1,6 +1,19 @@
{
"_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": null,
+ "payment_method": null,
+ "setup_intent": null,
+ "source": null,
+ "type": "card_error"
+ },
"headers": {
"Connection": "keep-alive",
"Content-Length": "269",
@@ -17,7 +30,9 @@
"idempotency-key": "00000000-0000-0000-0000-000000000000",
"original-request": "req_NORMALIZED0001",
"request-id": "req_NORMALIZED0001",
- "stripe-version": "2019-03-14"
+ "stripe-should-retry": "false",
+ "stripe-version": "2020-08-27",
+ "x-stripe-c-cost": "6"
},
"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 \"type\": \"card_error\"\n }\n}\n",
"http_status": 402,
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.2.json
index 3a826bb223d..e804e1f8fda 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.create.2.json
@@ -1,5 +1,6 @@
{
"amount": 184000,
+ "amount_captured": 184000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -18,6 +19,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -25,6 +27,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 23",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -59,7 +62,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.1.json
index d11322e442c..f4c2357daa4 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.1.json
@@ -2,6 +2,7 @@
"data": [
{
"amount": 48000,
+ "amount_captured": 0,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -20,6 +21,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": false,
"created": 1000000000,
"currency": "usd",
@@ -27,6 +29,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": "card_declined",
"failure_message": "Your card was declined.",
"fraud_details": {},
@@ -61,7 +64,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000002",
"funding": "credit",
+ "installments": null,
"last4": "0341",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
@@ -69,9 +74,15 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000002",
+ "receipt_url": null,
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
"shipping": null,
"source": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.2.json
index d5d988f3cbb..f94d2e808fa 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Charge.list.2.json
@@ -2,6 +2,7 @@
"data": [
{
"amount": 184000,
+ "amount_captured": 184000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -20,6 +21,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": true,
"created": 1000000000,
"currency": "usd",
@@ -27,6 +29,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 23",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
@@ -61,7 +64,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000001",
"funding": "credit",
+ "installments": null,
"last4": "4242",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
@@ -71,7 +76,13 @@
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000002/rcpt_NORMALIZED000000000000000000001",
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000002/refunds"
+ },
"review": null,
"shipping": null,
"source": {
@@ -108,6 +119,7 @@
},
{
"amount": 48000,
+ "amount_captured": 0,
"amount_refunded": 0,
"application": null,
"application_fee": null,
@@ -126,6 +138,7 @@
"name": "Ada Starr",
"phone": null
},
+ "calculated_statement_descriptor": "STRIPE* ZULIP STANDARD",
"captured": false,
"created": 1000000000,
"currency": "usd",
@@ -133,6 +146,7 @@
"description": "Upgrade to Zulip Standard, $80.0 x 6",
"destination": null,
"dispute": null,
+ "disputed": false,
"failure_code": "card_declined",
"failure_message": "Your card was declined.",
"fraud_details": {},
@@ -167,7 +181,9 @@
"exp_year": 2033,
"fingerprint": "NORMALIZED000002",
"funding": "credit",
+ "installments": null,
"last4": "0341",
+ "network": "visa",
"three_d_secure": null,
"wallet": null
},
@@ -175,9 +191,15 @@
},
"receipt_email": "[email protected]",
"receipt_number": null,
- "receipt_url": "https://pay.stripe.com/receipts/acct_NORMALIZED000001/ch_NORMALIZED00000000000001/rcpt_NORMALIZED000000000000000000002",
+ "receipt_url": null,
"refunded": false,
- "refunds": {},
+ "refunds": {
+ "data": [],
+ "has_more": false,
+ "object": "list",
+ "total_count": 0,
+ "url": "/v1/charges/ch_NORMALIZED00000000000001/refunds"
+ },
"review": null,
"shipping": null,
"source": {
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.create.1.json
index dea0366ab2c..08de472be26 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "cvc_check": "pass",
- "dynamic_last4": null,
- "exp_month": 3,
- "exp_year": 2033,
- "fingerprint": "NORMALIZED000002",
- "funding": "credit",
- "id": "card_NORMALIZED00000000000002",
- "last4": "0341",
- "metadata": {},
- "name": "Ada Starr",
- "object": "card",
- "tokenization_method": null
- }
- ],
- "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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.1.json
index 5f121133f1b..ea9d4a470e6 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.2.json
index 5f121133f1b..ea9d4a470e6 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.retrieve.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -46,6 +45,7 @@
"realm_str": "zulip"
},
"name": null,
+ "next_invoice_sequence": 1,
"object": "customer",
"phone": null,
"preferred_locales": [],
@@ -83,21 +83,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.save.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.save.1.json
index 5828b5becfc..88d5c69190f 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.save.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Customer.save.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -22,58 +21,10 @@
"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_NORMALIZED0001",
- "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_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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.create.1.json
index 6f9b1d293ca..9c8c17c5ed4 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.create.1.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
+ "discounts": [],
"due_date": null,
"ending_balance": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
"invoice_pdf": null,
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 184000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -184000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -184000,
+ "unit_amount_decimal": "-184000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -89,14 +137,20 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": 1000000000,
- "number": "NORMALI-0001",
+ "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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
- "webhooks_delivered_at": null
+ "transfer_data": null,
+ "webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.finalize_invoice.1.json
index dcb9810ba71..a04f73a460a 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.finalize_invoice.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.finalize_invoice.1.json
@@ -1,6 +1,7 @@
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -8,7 +9,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -26,22 +30,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000011d2Zr",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000011d2Zr/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 184000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -51,6 +59,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
@@ -62,8 +89,10 @@
"amount": -184000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -73,6 +102,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -184000,
+ "unit_amount_decimal": "-184000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -91,12 +139,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -110,8 +164,9 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.list.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.list.2.json
index b746fc51cae..aaa6d2eafd9 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.list.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--Invoice.list.2.json
@@ -2,7 +2,8 @@
"data": [
{
"account_country": "US",
- "account_name": "Dev account",
+ "account_name": null,
+ "account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
@@ -10,7 +11,10 @@
"attempt_count": 0,
"attempted": true,
"auto_advance": false,
- "billing": "charge_automatically",
+ "automatic_tax": {
+ "enabled": false,
+ "status": null
+ },
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
@@ -28,22 +32,26 @@
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
- "description": "",
+ "description": null,
"discount": null,
- "due_date": 1000000000,
+ "discounts": [],
+ "due_date": null,
"ending_balance": 0,
"footer": null,
- "hosted_invoice_url": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED00000000000000011d2Zr",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/invst_NORMALIZED0000000000000001/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED00000000000000011d2Zr/pdf",
+ "last_finalization_error": null,
"lines": {
"data": [
{
"amount": 184000,
"currency": "usd",
"description": "Zulip Standard",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000001",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -53,6 +61,25 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
@@ -64,8 +91,10 @@
"amount": -184000,
"currency": "usd",
"description": "Payment (Card ending in 4242)",
+ "discount_amounts": [],
"discountable": false,
- "id": "ii_NORMALIZED00000000000002",
+ "discounts": [],
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -75,6 +104,25 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -184000,
+ "unit_amount_decimal": "-184000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
@@ -93,12 +141,18 @@
"next_payment_attempt": null,
"number": "NORMALI-0001",
"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 Standard",
@@ -112,9 +166,10 @@
"subscription": null,
"subtotal": 0,
"tax": null,
- "tax_percent": null,
"total": 0,
+ "total_discount_amounts": [],
"total_tax_amounts": [],
+ "transfer_data": null,
"webhooks_delivered_at": 1000000000
}
],
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.1.json
index dbca4bb6910..e7e8ac47f7b 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.1.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Payment (Card ending in 4242)",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000002",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": -184000,
+ "unit_amount_decimal": "-184000"
+ },
"proration": false,
"quantity": 1,
"subscription": null,
"tax_rates": [],
- "unit_amount": -184000
+ "unit_amount": -184000,
+ "unit_amount_decimal": "-184000"
}
diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.2.json
index 803ae7d6b8b..94f145f0033 100644
--- a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails--InvoiceItem.create.2.json
@@ -5,6 +5,7 @@
"date": 1000000000,
"description": "Zulip Standard",
"discountable": false,
+ "discounts": [],
"id": "ii_NORMALIZED00000000000001",
"invoice": null,
"livemode": false,
@@ -15,9 +16,29 @@
"start": 1000000000
},
"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,
+ "tiers_mode": null,
+ "transform_quantity": null,
+ "type": "one_time",
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
+ },
"proration": false,
"quantity": 23,
"subscription": null,
"tax_rates": [],
- "unit_amount": 8000
+ "unit_amount": 8000,
+ "unit_amount_decimal": "8000"
}
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.1.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.1.json
index 611715f7d65..276fd1f723d 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.1.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.1.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,28 +26,5 @@
"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
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.2.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.2.json
index bedc055ea8e..c3568a69d35 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.2.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Customer.create.2.json
@@ -1,5 +1,4 @@
{
- "account_balance": 0,
"address": null,
"balance": 0,
"created": 1000000000,
@@ -27,28 +26,5 @@
"phone": null,
"preferred_locales": [],
"shipping": null,
- "sources": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/sources"
- },
- "subscriptions": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/subscriptions"
- },
- "tax_exempt": "none",
- "tax_ids": {
- "data": [],
- "has_more": false,
- "object": "list",
- "total_count": 0,
- "url": "/v1/customers/cus_NORMALIZED0002/tax_ids"
- },
- "tax_info": null,
- "tax_info_verification": null
+ "tax_exempt": "none"
}
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.1.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.1.json
index 53046e529af..50fa54e261e 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.1.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.1.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000001",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5WD2X8vgpBNGcuW1tN2f",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQvZofvelKZX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5WD2X8vgpBNGE21GzpwP"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0001",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -111,6 +107,7 @@
"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 Standard",
@@ -124,10 +121,9 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.2.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.2.json
index ec49e6137de..cc6fed629ab 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.2.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--Invoice.create.2.json
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -37,7 +35,6 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": null,
- "finalized_at": null,
"footer": null,
"hosted_invoice_url": null,
"id": "in_NORMALIZED00000000000002",
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5YD2X8vgpBNGNd7J1uOm",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQjioBLzz20A",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5YD2X8vgpBNGTl8t3uQk"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -98,7 +94,7 @@
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
- "number": "NORMALI-0002",
+ "number": null,
"object": "invoice",
"on_behalf_of": null,
"paid": false,
@@ -111,6 +107,7 @@
"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 Standard",
@@ -124,10 +121,9 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 7c614470bd9..031ec95514b 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5WD2X8vgpBNGcuW1tN2f",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQvZofvelKZX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5WD2X8vgpBNGE21GzpwP"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5YD2X8vgpBNGTHOok8yX",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -111,6 +107,7 @@
"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 Standard",
@@ -124,10 +121,9 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 10597ed2e8e..aee3bfc5c3c 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5YD2X8vgpBNGNd7J1uOm",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQjioBLzz20A",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5YD2X8vgpBNGTl8t3uQk"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5aD2X8vgpBNGM1GaJWq6",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -111,6 +107,7 @@
"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 Standard",
@@ -124,10 +121,9 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
"transfer_data": null,
- "webhooks_delivered_at": null
+ "webhooks_delivered_at": 1000000000
}
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 8e36bacac32..8e3e6a039e7 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -30,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5WD2X8vgpBNGcuW1tN2f",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQvZofvelKZX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5WD2X8vgpBNGE21GzpwP"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5YD2X8vgpBNGTHOok8yX",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -113,6 +109,7 @@
"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 Standard",
@@ -126,7 +123,6 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 3df53690c34..3df5bb58ec2 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -30,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5WD2X8vgpBNGcuW1tN2f",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQvZofvelKZX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5WD2X8vgpBNGE21GzpwP"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5YD2X8vgpBNGTHOok8yX",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -113,6 +109,7 @@
"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 Standard",
@@ -126,7 +123,6 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 d71df56bc87..f184b521cab 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -30,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5YD2X8vgpBNGNd7J1uOm",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQjioBLzz20A",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5YD2X8vgpBNGTl8t3uQk"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5aD2X8vgpBNGM1GaJWq6",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -113,6 +109,7 @@
"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 Standard",
@@ -126,7 +123,6 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 3f1f88fc086..e68d8846c61 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
@@ -2,12 +2,12 @@
"data": [
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -15,7 +15,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -30,7 +29,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -39,11 +37,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -54,7 +51,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -69,13 +66,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5YD2X8vgpBNGNd7J1uOm",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQjioBLzz20A",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -88,8 +85,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5YD2X8vgpBNGTl8t3uQk"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -104,7 +100,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5aD2X8vgpBNGM1GaJWq6",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -113,6 +109,7 @@
"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 Standard",
@@ -126,7 +123,6 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 2418f39693d..40556099986 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh",
"id": "in_NORMALIZED00000000000001",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001GUCdm/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000001pYxjh/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000001",
+ "id": "il_NORMALIZED00000000000001",
"invoice_item": "ii_NORMALIZED00000000000001",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5WD2X8vgpBNGcuW1tN2f",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQvZofvelKZX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5WD2X8vgpBNGE21GzpwP"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5YD2X8vgpBNGTHOok8yX",
+ "payment_intent": "pi_NORMALIZED00000000000001",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -111,6 +107,7 @@
"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 Standard",
@@ -124,7 +121,6 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
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 519abd4a2f0..d08bc172ac2 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
@@ -1,11 +1,11 @@
{
"account_country": "US",
- "account_name": "NORMALIZED-1",
+ "account_name": null,
"account_tax_ids": null,
"amount_due": 6400,
"amount_paid": 0,
"amount_remaining": 6400,
- "application_fee": null,
+ "application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": false,
@@ -13,7 +13,6 @@
"enabled": false,
"status": null
},
- "billing": "send_invoice",
"billing_reason": "manual",
"charge": null,
"collection_method": "send_invoice",
@@ -28,7 +27,6 @@
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
- "date": 1000000000,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
@@ -37,11 +35,10 @@
"discounts": [],
"due_date": 1000000000,
"ending_balance": 0,
- "finalized_at": 1000000000,
"footer": null,
- "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP",
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm",
"id": "in_NORMALIZED00000000000002",
- "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002rAehP/pdf",
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_NORMALIZED000001/invst_NORMALIZED0000000000000002HMmgm/pdf",
"last_finalization_error": null,
"lines": {
"data": [
@@ -52,7 +49,7 @@
"discount_amounts": [],
"discountable": false,
"discounts": [],
- "id": "ii_NORMALIZED00000000000002",
+ "id": "il_NORMALIZED00000000000002",
"invoice_item": "ii_NORMALIZED00000000000002",
"livemode": false,
"metadata": {},
@@ -67,13 +64,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5YD2X8vgpBNGNd7J1uOm",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQjioBLzz20A",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
@@ -86,8 +83,7 @@
"subscription": null,
"tax_amounts": [],
"tax_rates": [],
- "type": "invoiceitem",
- "unique_id": "il_1J4k5YD2X8vgpBNGTl8t3uQk"
+ "type": "invoiceitem"
}
],
"has_more": false,
@@ -102,7 +98,7 @@
"object": "invoice",
"on_behalf_of": null,
"paid": false,
- "payment_intent": "pi_1J4k5aD2X8vgpBNGM1GaJWq6",
+ "payment_intent": "pi_NORMALIZED00000000000002",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
@@ -111,6 +107,7 @@
"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 Standard",
@@ -124,7 +121,6 @@
"subscription": null,
"subtotal": 6400,
"tax": null,
- "tax_percent": null,
"total": 6400,
"total_discount_amounts": [],
"total_tax_amounts": [],
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.1.json
index 9a210d6002d..2c843d7a5b7 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.1.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.1.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5WD2X8vgpBNGcuW1tN2f",
+ "id": "price_NORMALIZED00000000000001",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQvZofvelKZX",
+ "product": "prod_NORMALIZED0001",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.2.json
index 5fdfdbe6521..983ea58d3c2 100644
--- a/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.2.json
+++ b/corporate/tests/stripe_fixtures/void_all_open_invoices--InvoiceItem.create.2.json
@@ -21,13 +21,13 @@
"billing_scheme": "per_unit",
"created": 1000000000,
"currency": "usd",
- "id": "price_1J4k5YD2X8vgpBNGNd7J1uOm",
+ "id": "price_NORMALIZED00000000000002",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
- "product": "prod_JiAQjioBLzz20A",
+ "product": "prod_NORMALIZED0002",
"recurring": null,
"tiers_mode": null,
"transform_quantity": null,
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index 1989fd797ea..3171ba523ac 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -208,22 +208,26 @@ def normalize_fixture_data(
) -> None: # nocoverage
# stripe ids are all of the form cus_D7OT2jf5YAtZQ2
id_lengths = [
+ ("test", 12),
("cus", 14),
- ("sub", 14),
+ ("prod", 14),
+ ("req", 14),
("si", 14),
("sli", 14),
- ("req", 14),
- ("tok", 24),
+ ("sub", 14),
+ ("acct", 16),
("card", 24),
- ("txn", 24),
("ch", 24),
- ("in", 24),
("ii", 24),
- ("test", 12),
- ("src_client_secret", 24),
+ ("il", 24),
+ ("in", 24),
+ ("pi", 24),
+ ("price", 24),
("src", 24),
+ ("src_client_secret", 24),
+ ("tok", 24),
+ ("txn", 24),
("invst", 26),
- ("acct", 16),
("rcpt", 31),
]
# We'll replace cus_D7OT2jf5YAtZQ2 with something like cus_NORMALIZED0001
@@ -559,7 +563,7 @@ class StripeTest(StripeTestCase):
"amount_due": 0,
"amount_paid": 0,
"auto_advance": False,
- "billing": "charge_automatically",
+ "collection_method": "charge_automatically",
"charge": None,
"status": "paid",
"total": 0,
@@ -711,7 +715,7 @@ class StripeTest(StripeTestCase):
"amount_paid": 0,
"attempt_count": 0,
"auto_advance": True,
- "billing": "send_invoice",
+ "collection_method": "send_invoice",
"statement_descriptor": "Zulip Standard",
"status": "open",
"total": 8000 * 123,
@@ -960,7 +964,6 @@ class StripeTest(StripeTestCase):
"amount_paid": 0,
"amount_remaining": 15 * 80 * 100,
"auto_advance": True,
- "billing": "charge_automatically",
"collection_method": "charge_automatically",
"customer_email": self.example_email("hamlet"),
"discount": None,
@@ -1002,7 +1005,6 @@ class StripeTest(StripeTestCase):
invoice_params = {
"amount_due": 5172,
"auto_advance": True,
- "billing": "charge_automatically",
"collection_method": "charge_automatically",
"customer_email": "[email protected]",
}
@@ -1139,7 +1141,6 @@ class StripeTest(StripeTestCase):
"amount_paid": 0,
"amount_remaining": 123 * 80 * 100,
"auto_advance": True,
- "billing": "send_invoice",
"collection_method": "send_invoice",
"customer_email": self.example_email("hamlet"),
"discount": None,
@@ -1828,7 +1829,7 @@ class StripeTest(StripeTestCase):
number_of_sources += 1
# Verify that we replaced the previous card, rather than adding a new one
self.assertEqual(number_of_sources, 1)
- # Ideally we'd also test that we don't pay invoices with billing=='send_invoice'
+ # Ideally we'd also test that we don't pay invoices with collection_method=='send_invoice'
for stripe_invoice in stripe.Invoice.list(customer=stripe_customer_id):
self.assertEqual(stripe_invoice.status, "paid")
self.assertEqual(
@@ -2443,7 +2444,7 @@ class StripeTest(StripeTestCase):
"amount_paid": 0,
"attempt_count": 0,
"auto_advance": True,
- "billing": "send_invoice",
+ "collection_method": "send_invoice",
"statement_descriptor": "Zulip Standard",
"status": "open",
"total": (8000 * 150 + 8000 * 50),
@@ -2493,7 +2494,7 @@ class StripeTest(StripeTestCase):
"amount_paid": 0,
"attempt_count": 0,
"auto_advance": True,
- "billing": "send_invoice",
+ "collection_method": "send_invoice",
"statement_descriptor": "Zulip Standard",
"status": "open",
"total": 8000 * 120,
@@ -2691,7 +2692,7 @@ class StripeTest(StripeTestCase):
)
stripe_invoice = stripe.Invoice.create(
auto_advance=True,
- billing="send_invoice",
+ collection_method="send_invoice",
customer=zulip_customer.stripe_customer_id,
days_until_due=30,
statement_descriptor="Zulip Standard",
@@ -2709,7 +2710,7 @@ class StripeTest(StripeTestCase):
)
stripe_invoice = stripe.Invoice.create(
auto_advance=True,
- billing="send_invoice",
+ collection_method="send_invoice",
customer=lear_customer.stripe_customer_id,
days_until_due=30,
statement_descriptor="Zulip Standard",
@@ -2748,7 +2749,7 @@ class StripeTest(StripeTestCase):
)
invoice = stripe.Invoice.create(
auto_advance=True,
- billing="send_invoice",
+ collection_method="send_invoice",
customer=customer.stripe_customer_id,
days_until_due=DEFAULT_INVOICE_DAYS_UNTIL_DUE,
statement_descriptor="Zulip Standard",
@@ -3512,7 +3513,7 @@ class InvoiceTest(StripeTestCase):
plan.save(update_fields=["fixed_price", "price_per_license"])
invoice_plan(plan, self.next_year)
[invoice0, invoice1] = stripe.Invoice.list(customer=plan.customer.stripe_customer_id)
- self.assertEqual(invoice0.billing, "send_invoice")
+ self.assertEqual(invoice0.collection_method, "send_invoice")
[item] = invoice0.lines
line_item_params = {
"amount": 100,
diff --git a/stubs/stripe/__init__.pyi b/stubs/stripe/__init__.pyi
index cbf6b6700b3..7ed8adc0fd2 100644
--- a/stubs/stripe/__init__.pyi
+++ b/stubs/stripe/__init__.pyi
@@ -18,7 +18,7 @@ class Customer:
sources: List[Union[Card, Source]]
subscriptions: SubscriptionListObject
coupon: str
- account_balance: int
+ balance: int
email: str
description: str
discount: Optional[Discount]
@@ -44,7 +44,7 @@ class Invoice:
id: str
auto_advance: bool
amount_due: int
- billing: str
+ collection_method: str
billing_reason: str
default_source: Source
due_date: int
@@ -60,7 +60,7 @@ class Invoice:
) -> Invoice: ...
@staticmethod
def list(
- billing: str = ...,
+ collection_method: str = ...,
customer: str = ...,
status: str = ...,
limit: Optional[int] = ...,
@@ -69,7 +69,7 @@ class Invoice:
@staticmethod
def create(
auto_advance: bool = ...,
- billing: str = ...,
+ collection_method: str = ...,
customer: str = ...,
days_until_due: Optional[int] = ...,
statement_descriptor: str = ...,
@@ -95,7 +95,7 @@ class Subscription:
@staticmethod
def create(
customer: str = ...,
- billing: str = ...,
+ collection_method: str = ...,
days_until_due: Optional[int] = ...,
items: List[Dict[str, Any]] = ...,
prorate: bool = ...,