Integrations

Integrations

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Subscription Management

Payment Core app supports subscription billing through webhook-based callbacks for PayPal and Razorpay.

Subscription Payment Flow

PayPal Recurring Payments:

subscription_details = {
    "plan_id": "P-12345",
    "start_date": "2024-01-01",
    "billing_period": "Month",
    "billing_frequency": 1,
    "customer_notify": 1,
    "upfront_amount": 0
}

Razorpay Subscriptions:

subscription_details = {
    "plan_id": "plan_123",
    "start_date": "2024-01-01",
    "billing_period": "Month",
    "billing_frequency": 12,
    "customer_notify": 1
}

Webhook Handlers

Apps can handle subscription notifications through hooks:

# In app hooks.py
hook_events = {
    "handle_subscription_notification": "myapp.utils.handle_subscription"
}

The webhook creates an Integration Request and enqueues background processing for the subscription notification.
Last updated 2 months ago
Was this helpful?
Thanks!