Sign Up for a Paid Subscription (Known Customer)
Overview
This guide explains how to implement a paid subscription sign-up flow for a known customer.
A known customer is a customer who is already authenticated in your system and has a unique customer identifier. By including this identifier in the purchase link, you can associate the completed order with the correct customer record.
Once a visitor has made a decision to purchase your product, it is imperative that your checkout process is designed to make paying for software as easy and intuitive as possible. To enable known customers to seamlessly sign up for a paid subscription, integrate the following flow into your system:
Step 1: Create a purchase link
Create a purchase link and add the following parameters for mapping and reporting purposes:
internalcustomer- assign your unique customer identifier (UUID) to the parameters so that you can map the individual within your systemx-source, etc. - assign additional information to these x-parameters for reporting purposes
https://www.cleverbridge.com/864/?scope=checkout&cart=97771&internalcustomer=UUID-YOUR-UNIQUE-ID-1234-5678&language=en¤cy=USD&x-source=website-visit-05.2019&x-device-id=UUID-asd89ad-asd89sd-asd89s0
TipIf you already know a customer, you can optimize their experience by using single sign-on (SSO) to pre-populate the sign-up process. For more information, see Single Sign-On (SSO).
Step 2: Protect the purchase link
Call the Generate User Session URL API endpoint to protect the parameters in the TargetUrl.
curl --request POST \
--url 'https://rest.cleverbridge.com/urlgenerator/generateusersessionurl' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{
"TargetUrl": "https%3A%2F%2Fwww.cleverbridge.com%2F864%2F%3Fscope%3Dcheckout%26amp%3Bcart%3D97771%26amp%3Binternalcustomer%3DUUID-YOUR-UNIQUE-ID-1234-5678%26amp%3Blanguage%3Den%26amp%3Bcurrency%3DUSD%26amp%3Bx-source%3Dwebsite-visit-05.2019%26amp%3Bx-device-id%3DUUID-asd89ad-asd89sd-asd89s0"
}'Step 3: Forward customer to checkout process in protected link
In the checkout process, the customer is instructed on how to complete the transaction and submit their payment information. If the payment is successful, the customer receives a payment confirmation, as well as delivery details. If a key generator is configured for your account, a license key is generated in this process, and the license key is displayed in the delivery details.
Step 4: Cleverbridge sends you a PaidOrderNotification
After the customer successfully completes checkout, Cleverbridge sends a PaidOrderNotification. Use the notification to create or update the customer record in your CRM, licensing system, ERP, or other internal systems.
The notification contains information such as:
| Field | Description |
|---|---|
internalCustomer | Your internal customer identifier. |
subscriptionId | The Cleverbridge subscription ID. |
renewalType | Whether the subscription renews automatically or manually. |
intervalNumber | The current billing interval. For an initial free trial, this value is 0. |
nextBillingDate | The scheduled billing date after the trial ends. |
Updated 7 days ago