The Billing API provides operations for viewing subscription status, reviewing billing history and payments, starting trials, managing seats, creating checkout sessions, accessing the billing portal, canceling subscriptions, and saving billing details.
Endpoints
| Method | Path | Purpose |
| GET | /billing/status | Get subscription status |
| GET | /billing/dashboard-status | Get billing dashboard status |
| GET | /workspace/usage | Get usage |
| GET | /billing/history | Get subscription history |
| GET | /billing/payments | Get payments |
| POST | /billing/checkout | Create checkout session |
| POST | /billing/portal | Open billing portal |
| POST | /billing/activate-trial | Start trial |
| POST | /billing/expand-seats | Add seats |
| POST | /billing/cancel-pending-checkout | Cancel pending checkout |
| POST | /billing/cancel-subscription | Cancel subscription |
| POST | /billing/razorpay/confirm | Confirm Razorpay payment |
| POST | /billing/razorpay/sync | Synchronize Razorpay checkout |
| POST | /billing/paypal/confirm | Confirm PayPal subscription |
| POST | /billing/paypal/sync | Synchronize PayPal checkout |
| POST | /billing/sync-pending-checkout | Synchronize pending checkout |
| POST | /billing/save-billing-details | Save billing details |
| ALL | /billing/razorpay/return | Razorpay browser return |
| ALL | /billing/paypal/return | PayPal browser return |
| POST | /billing/webhook | Mock/sandbox billing webhook |
| POST | /billing/webhooks/razorpay | Razorpay webhook |
| POST | /billing/webhooks/paypal | PayPal webhook |
Subscription Plans
The audit reports:
FREE
STARTER
GROWTH
ENTERPRISE
Billing cycles:
monthly
annual
Payment providers:
Razorpay
Paypal
Checkout
Example request structure:
{
“plan”: “STARTER”,
“cycle”: “monthly”,
“provider”: “razorpay”
}
Additional checkout fields are supported by the audited implementation.
Redact:
- payment credentials
- customer identifiers
- private billing information
Need Help?
Email: support@ysdesk.com
Documentation: https://docs.ysplugins.com/ys-desk