Billing

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

MethodPathPurpose
GET/billing/statusGet subscription status
GET/billing/dashboard-statusGet billing dashboard status
GET/workspace/usageGet usage
GET/billing/historyGet subscription history
GET/billing/paymentsGet payments
POST/billing/checkoutCreate checkout session
POST/billing/portalOpen billing portal
POST/billing/activate-trialStart trial
POST/billing/expand-seatsAdd seats
POST/billing/cancel-pending-checkoutCancel pending checkout
POST/billing/cancel-subscriptionCancel subscription
POST/billing/razorpay/confirmConfirm Razorpay payment
POST/billing/razorpay/syncSynchronize Razorpay checkout
POST/billing/paypal/confirmConfirm PayPal subscription
POST/billing/paypal/syncSynchronize PayPal checkout
POST/billing/sync-pending-checkoutSynchronize pending checkout
POST/billing/save-billing-detailsSave billing details
ALL/billing/razorpay/returnRazorpay browser return
ALL/billing/paypal/returnPayPal browser return
POST/billing/webhookMock/sandbox billing webhook
POST/billing/webhooks/razorpayRazorpay webhook
POST/billing/webhooks/paypalPayPal 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

Next