0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 00:46:45 +01:00
Commit Graph

42 Commits

Author SHA1 Message Date
Zach Waterfield
f01b44db05
revert: "feat: annual credit purchases (#24691)" (#24898) 2024-09-10 16:30:15 -07:00
Zach Waterfield
0240afc6d3
feat: annual credit purchases (#24691) 2024-09-10 17:51:17 -04:00
timgl
b0b4a69971
fix(docs): Remove responses from all actions (#24548)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-23 14:06:27 +01:00
Michael Matloka
94d0d32b3c
chore(environments): Add project_id-based filtering to API (#23246)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-19 17:56:47 +02:00
Zach Waterfield
74e7b3dc4b
chore: remove SUBSCRIBE_TO_ALL_PRODUCTS ff (#23418)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-03 15:43:33 -04:00
Zach Waterfield
c62058c33f
feat: add a portal redirect endpoint (#23375)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Eric Duong <eric@posthog.com>
Co-authored-by: Dylan Martin <dylan@posthog.com>
Co-authored-by: Sandy Spicer <sandy@posthog.com>
Co-authored-by: Robbie <robbie.coomber@gmail.com>
Co-authored-by: Xavier Vello <xavier.vello@gmail.com>
Co-authored-by: Paul D'Ambra <paul@posthog.com>
Co-authored-by: Marcus Hof <13001502+MarconLP@users.noreply.github.com>
Co-authored-by: Juraj Majerik <juro.majerik@gmail.com>
Co-authored-by: Tom Owers <tom@posthog.com>
Co-authored-by: Phani Raj <phani@posthog.com>
2024-07-02 15:25:04 -04:00
Julian Bez
6c95fd18ba
chore(ruff): Add ruff rules for exception handling (#23251) 2024-06-27 12:39:21 +01:00
Zach Waterfield
99767a50c2
feat(billing): subscribe to all products (client side) (#22768)
Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-21 09:04:10 -07:00
Zach Waterfield
c5a4af4970
chore: updating activation endpoint to be activate (#22719)
* /activation -> /activate

* update the billing activate viewset actions

* update billing
2024-06-06 13:17:47 -04:00
Zach Waterfield
2fbc4e1647
chore: improve billing activation/deactivate tests and view validation (#22663)
* improve billing activation/deactivate views'

* Improve billing testing

* add failure test for activation

* improve plan error hanlding
2024-06-05 10:18:46 -04:00
Bianca Yang
6b42259376
fix: isinstance check on get_invoices error handler was backwards (#22255)
the isinstance check was wrong
2024-05-14 16:30:01 +03:00
Bianca Yang
d039cf6144
feat: Add warning that we will autopay open invoices to unsubscribe modal (#21953)
* add warning about auto paying open invoices on unsubscribe modal

* Update frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx

Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com>

* undo lemoncollapse

* wip

* some small tweaks

* Update UI snapshots for `chromium` (1)

* some dict accessor wrappers just in case

* add fix for sentry error

* wrong syntax for raising exception

---------

Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-08 21:02:23 +00:00
Bianca Yang
69dfe43e8a
feat: Block subscriptions if there are open invoices on the customer (#22057)
* retrieve open invoices as part of /billing loading, show warning

* small fixes

* address pr feedback

* small grammar update

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-08 10:30:53 -07:00
Bianca Yang
f4fe46378c
feat: Show error messages from server on billing page (#21765)
* show error messages on billing page

* some more updates

* extraneous exception and pr feedback

* Move error display into the unsubscribe modal
* Only show link to stripe if the error detail is about open invoices

* Update frontend/src/scenes/billing/billingLogic.tsx

Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com>

* remove opensupportform from billingLogic

---------

Co-authored-by: Raquel Smith <raquelmsmith@users.noreply.github.com>
2024-04-25 19:50:55 +00:00
Zach Waterfield
056300f635
chore: add groups to billing limit events (#21307)
* Add groups to billing limit events

* Use the groups function

* make sure team exists
2024-04-03 18:49:33 -04:00
Ben White
4dd3c35933
feat: Personal API key scopes (#20151) 2024-02-20 11:02:58 +00:00
Ben White
aff0d6349e
feat: Simplify standard permissions (#20172) 2024-02-12 13:55:21 +00:00
Tom Owers
5513be7731
chore: upgraded Ruff linter (#18188)
* Upgraded Ruff linter

* Formatted whole codebase with new ruff rules

* Revert import removal

* Fixed mypi issues or added ignores

* Fixed schema formatting

* Fixed hogvm failing tests

* Remove duplicate key in list
2023-10-26 12:38:15 +02:00
Raquel Smith
4e53dc74b7
feat: sync distinct ids with billing (#16919)
* update billing distinct IDs on user join/leave org

* temporarily update on usage report send
to update existing orgs

* abstract a bit more

* update existing tests

* add billing_manager test for the method

* Update query snapshots

* specify date

* move outside the transaction

* cache the instance license

* use new instance license method in other places

* fix mypy and some tests

* Update query snapshots

* Update query snapshots

* fix caching in tests

* constrain try/except

* Update query snapshots

* make sure we hae license before update billing

* Update query snapshots

* Update query snapshots

* set to false if no instance license

* fix date

* Update query snapshots

* use correct var

* Update UI snapshots for `chromium` (1)

* clear license cache before running tests

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* fix tests

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-17 11:41:25 -07:00
Raquel Smith
d03fa0a953
feat(billing): create product-specific billing page (#15035)
* clean up and organize

* create ff and stub out new product layout

* Split main billing page

* refactor test billing product

* rename table bordered to borderedRows

* Add stealth display to table for minimal styling

* key the logic

* stub addons

* working version connected to api

* accept usage key from custom_limits_usd map
just in case some old ones are left dangling

* consolidate pricing tables and more

* add pricing modal

* avoid errors

* fix

* fix tests

* Handle contact_support products

* Update UI snapshots for `chromium` (2)

* incorporate fixes from em's other PR

* Update UI snapshots for `chromium` (2)

* Fix some tests and type errors

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* more type fixes

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `webkit` (2)

* Hide billing limit field if it's open & then unsub

* just say products not your products

* feat: add product comparisons and ingestion styling/logic (#15040)

* add upgrade CTA on plan card

* add a modal to show plan details

* make ingestion view work

* add upgrade all button on ingestion

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `firefox` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `firefox` (2)

* redirect back to ingestion if that's where they were

* stay on billing panel til they are done sub-ing

* upgrade to addons automatically in onbdg

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* only include free tier in gauge if there is one

* use proj_amt_usd instead of calculating on frontend

* usage_key not type

---------

Co-authored-by: Emanuele Capparelli <k@emkpp.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-13 17:43:33 +00:00
Emanuele Capparelli
7a0a7283e0
fix: better billing debug (#14223)
* fix: better billing debugging

* fix error handler
2023-02-13 16:24:16 -08:00
Ben White
3234aaf081
feat: Billing limits take 2 (#14198)
* Revert "revert: Billing change (#14195)"

This reverts commit e0a65353e5.

* Fix up access
2023-02-13 14:43:53 -08:00
Ben White
e0a65353e5
revert: Billing change (#14195) 2023-02-13 08:58:30 +00:00
Emanuele Capparelli
037b635945
feat: chron job to rate limit orgs based on usage (#13521) 2023-02-13 09:03:22 +01:00
Raquel Smith
bac246a98e
chore: hook pricing table to billing service plans (#13857)
* Get rid of control version

* Don't show option to license on billing page

* Remove ff constant

* Include plans in billing response

* Update types for the plans

* Hook up the top of the table

* Fill out the rest of the table

* Hook up the rest of the table

* Add tooltip with feature descriptions

* Fix type errors

* Fix more type issues

* Remove old plan data

* clean up

* exclude features we don't want to show in table

* Tolerate missing plan keys

* fix mypy

* Update cypresss test

* Fix mypy again

* Just get whatever default plans

* fix tests

* Update snapshots

* Update snapshots

* moar test fixes

* use is_free to know if free plan

* Say the free allotment is incl'd if base has $ price

* Update snapshots

* Don't change anything having to do with licenses

* Fix type error

* Update snapshots

* Update snapshots

* Use product name from stripe

* only lowercase

* don't hardcode plan names

Co-authored-by: Emanuele Capparelli <k@emkpp.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-26 16:04:30 +00:00
Emanuele Capparelli
6fe761eadb
feat: sync distinct_ids with billing service for reporting purposes (#13188)
* feat: sync distinct_ids with billing service for reporting purposes

* add test

* send ids through token

* fix mypy

* fix test
2022-12-12 15:37:14 +02:00
Emanuele Capparelli
1758f83e8f
fix: deactivate customers remotely (#13244)
* fix: deactivate customers remotely

* fix billing alerts

* add free trial check
2022-12-12 11:17:26 +00:00
Raquel Smith
2f10b24a16
feat(onboarding): let people create demo project (#12877)
* Allow creating new team/project with is_demo flag

* make is_demo not read-only

* Give ppl option to create demo proj right away

* Load the demo data if it's a demo project

* Make sure the variable exists

* Add a demo tag next to demo projects in switcher

* Add a darker color to snack
so it shows up on a hovered button

* Swap bookmarklet for 'generating demo data' panel

* Finish getting rid of bookmarklet (test only)

* Show the demo flag in the main nav if Is_demo

* Update permissions to create a new proj if is_demo
and the org doesn't already have a demo proj

* If org already has a demo proj, just go there

* Add DemoProjectButton

* Don't show ingestion details if it's a demo team

* Don't show ingestion flow on demo project
I doubt people will land here, but just in case

I also renamed the ingestionLogic file name since we renamed the
logic itself previously

* Fix a couple ts errors

* Fix and write new pytests

* Don't change test strings

* Add a story for the snack

* Minor fixes

* Don't set completed_snippet_onboarding
just deal with it otherwise

* Remove the demo data option from platforms

* Change CTA to reflect existing demo project

* Only make the first button primary

* Fix ts error

* feat: prevent billing for events in demo projects (#12924)

* Don't include events in a demo proj in billing

* filter demo teams from usage reports

* Fix ts error

* Make sure demo teams actually aren't included

* take a stab at a test for this

* fix test

Co-authored-by: Emanuele Capparelli <k@emkpp.com>

* Enable master project demo data on Cloud too

* Use proper python

Co-authored-by: Michael Matloka <dev@twixes.com>

* Address review suggestions

* Remove color option from ProjectName
It was the same for all uses

Co-authored-by: Emanuele Capparelli <k@emkpp.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2022-11-29 10:45:04 -08:00
Emanuele Capparelli
13e8e65f95
fix: billing v2 throwing status 500 (#12930)
* fix: billing v2 throwing status 500

* added test
2022-11-23 18:30:33 +00:00
Emanuele Capparelli
074dbffd9b
fix: customer group analytics (#12670)
* fix: customer group analytics

* Update snapshots

* customer group analytics when loading user

* fix api mock

* fix snapshot

* Update frontend/src/scenes/billing/v2/billingLogic.ts

Co-authored-by: Ben White <ben@benjackwhite.co.uk>

* fix

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben White <ben@benjackwhite.co.uk>
2022-11-10 16:38:46 +00:00
Ben White
c8b3579d51
feat: Rollout billing v2 (#12644) 2022-11-07 13:40:14 +00:00
Ben White
67b0538e42
fix: Fixed usage report to billing and feature flag check (#12618) 2022-11-03 19:19:14 +00:00
Ben White
e17c64655c
fix: Small billing bugs (#12607) 2022-11-03 17:42:48 +00:00
Ben White
cd9a5e6d29
feat: Added billing event tracking (#12594) 2022-11-03 12:28:14 +01:00
Ben White
f529f14c89
feat: Correctly sync available features (#12538) 2022-11-03 09:22:41 +00:00
Emanuele Capparelli
8f7a1fe55c
feat: group capture customers (#12553)
* feat: group capture customers

* move it to backend
2022-11-03 10:25:50 +02:00
Ben White
28d72e308d
fix: Billing check for active subscription (#12440) 2022-10-26 12:50:04 +00:00
Ben White
fea961e904
feat: Billing V2 support for enterprise billing (#12425) 2022-10-26 09:13:00 +00:00
Ben White
9e9149eb50
feat: Additonal billing-v2 improvements (#12340) 2022-10-21 11:04:14 +02:00
Ben White
49da89080b
fix: Billing V2 cache key (#12341) 2022-10-19 12:57:46 +00:00
Ben White
683a4aab1a
fix: Check for active subscription to determine billing version (#12330) 2022-10-19 10:28:26 +00:00
Ben White
b4a401d532
feat: Billing V2 (#11986) 2022-10-19 08:58:36 +02:00