feat(payments): Add variable pricing with deposit collection
Services can now have variable pricing where: - Final price is determined after service completion - A deposit (fixed amount or percentage) is collected at booking - Customer's saved payment method is charged for remaining balance Changes: - Add variable_pricing, deposit_amount, deposit_percent fields to Service model - Add service FK and final_price fields to Event model - Add AWAITING_PAYMENT status to Event - Add SetFinalPriceView endpoint to charge customer's saved card - Add EventPricingInfoView endpoint for pricing details - Update Services page with variable pricing toggle and deposit config - Show "From $X" and deposit info in customer preview 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,9 @@ from .views import (
|
||||
CustomerSetupIntentView,
|
||||
CustomerPaymentMethodDeleteView,
|
||||
CustomerPaymentMethodDefaultView,
|
||||
# Variable pricing / final charge
|
||||
SetFinalPriceView,
|
||||
EventPricingInfoView,
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
@@ -84,4 +87,8 @@ urlpatterns = [
|
||||
path('customer/setup-intent/', CustomerSetupIntentView.as_view(), name='customer-setup-intent'),
|
||||
path('customer/payment-methods/<str:payment_method_id>/', CustomerPaymentMethodDeleteView.as_view(), name='customer-payment-method-delete'),
|
||||
path('customer/payment-methods/<str:payment_method_id>/default/', CustomerPaymentMethodDefaultView.as_view(), name='customer-payment-method-default'),
|
||||
|
||||
# Variable pricing / final charge endpoints
|
||||
path('events/<int:event_id>/final-price/', SetFinalPriceView.as_view(), name='set-final-price'),
|
||||
path('events/<int:event_id>/pricing/', EventPricingInfoView.as_view(), name='event-pricing-info'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user