Expose POST /api/finance/portal/ so authenticated users can open Stripe's hosted portal for plan changes, payment methods, and cancellations (chat_web_app#33 companion).
38 lines
777 B
Python
38 lines
777 B
Python
from django.urls import path
|
|
|
|
from finance.views import (
|
|
CreateBillingPortalSessionView,
|
|
CreateCheckoutSessionView,
|
|
InvoiceListView,
|
|
PaymentListView,
|
|
StripeWebhookView,
|
|
)
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"checkout/",
|
|
CreateCheckoutSessionView.as_view(),
|
|
name="finance_checkout",
|
|
),
|
|
path(
|
|
"portal/",
|
|
CreateBillingPortalSessionView.as_view(),
|
|
name="finance_portal",
|
|
),
|
|
path(
|
|
"invoices/",
|
|
InvoiceListView.as_view(),
|
|
name="finance_invoices",
|
|
),
|
|
path(
|
|
"payments/",
|
|
PaymentListView.as_view(),
|
|
name="finance_payments",
|
|
),
|
|
path(
|
|
"webhooks/stripe/",
|
|
StripeWebhookView.as_view(),
|
|
name="finance_stripe_webhook",
|
|
),
|
|
]
|