Example: Fixed pricing
New Tunes offers a music streaming service with monthly and yearly plans. Customers pay the selected plan price at the beginning of each billing interval, and Cleverbridge renews the subscription on the agreed schedule.
Scenario at a glance
How sign-up works
- New Tunes creates a checkout URL for the selected plan.
- New Tunes redirects the customer to Cleverbridge checkout.
- The customer creates or confirms the payment profile and submits the payment.
- Cleverbridge sends New Tunes a
PaidOrderNotification. - New Tunes grants access, and Cleverbridge emails the invoice to the customer.
Notifications connect subscription events to New Tunes' entitlement and customer-service processes. To configure them, see Manage Notifications. For event definitions, see Notification Types.
Implementation details for sign-up
A sign-up URL can look like this:
https://<secure.yourdomain.com>/<your client account ID>/purl-checkout?cart=<ID of the music plan>&firstname=Han&lastname=Solo
You can predefine customer data such as firstname, lastname, and emailaddress. For all supported parameters, see Checkout Process Parameters > Customer Data.
To use an existing payment profile, generate a session URL and include the customer's UUID. For more information, see Single Sign-On (SSO).
For an offline payment, New Tunes receives a NewOfflinePaymentPurchaseNotification. The CustomerConfirmationPageUrlNotification includes a link to the confirmation page where New Tunes can show payment instructions.
What happens at renewal
- Cleverbridge reminds the customer about the upcoming charge and sends New Tunes a
SubscriptionReminderChargeNotification. - On the renewal date, Cleverbridge charges the existing payment profile.
- After payment confirmation, Cleverbridge sends a
PaidOrderNotification. - New Tunes continues the customer's access, and Cleverbridge emails the invoice.
Some reminder emails are optional and are not active by default. For more information, see Customer email types.
Offline payment methods follow a different lifecycle. For more information, see Flow charts for notification events.
Switch the billing interval immediately
A customer can move from a monthly plan to a yearly plan without waiting for the next renewal.
The monthly plan costs $10 per month, or $120 over 12 months. The yearly plan costs $100, which provides a 16% discount.
- New Tunes requests a price preview for the new billing plan.
- New Tunes displays the new price to the customer.
- After the customer confirms, New Tunes submits the change.
- Cleverbridge processes the payment and sends a
PaidOrderNotification.
API settings for the billing interval change
Use /subscription/updatesubscriptionitem for both the preview and the confirmed change.
For the preview, include:
ProductIdfor the new billing plan.AlignmentSettings.GetCustomerPricePreviewOnly = true.AlignmentSettings.AlignToCurrentInterval = true.
After confirmation, call the same route with:
ProductIdfor the new billing plan.AlignmentSettings.GetCustomerPricePreviewOnly = false.AlignmentSettings.AlignToCurrentInterval = true.
If the payment profile is invalid, send the customer to the ContinueUrl from the API response so they can update the profile and complete payment.
Extend the renewal date
Use this flow when New Tunes grants additional time because of a free trial or customer complaint:
- Retrieve the current renewal date with
/subscription/getsubscription?subscriptionid={subscriptionid}. - Calculate the extended date.
- Update it with /subscription/updatenextbillingdate.
- Receive a
SubscriptionBillingDateExtendedNotification.