Suppose you’re selling courses managed by NetDimensions Learning. Using the Talent Suite API, you could create a custom storefront that would let your customers browse and search for your courses. You could also incorporate a shopping cart so that customers can collect multiple courses that they can purchase in a single transaction.
But what about when it comes time to check out? How do you ensure that Talent Suite handles the payment correctly, and makes the courses available to the customer after the payment is successful?
Starting from 10.1 build 1521, Talent Suite supports the Checkout API, a new, streamlined checkout process for use with custom storefronts. The Checkout API is compatible with all supported payment gateways and plugins.
To use the Checkout API, your shopping cart will need to record an item ID value for each item in the cart. The item ID is available for each module session returned by api/module, e.g.:
<itemId>course1/EKP000000200</itemId>
Once the customer is ready to pay, you can redirect them to servlet/ekp/checkout (relative to the base URL of the site; for example, the full URL might be https://www.example.com/ekp/servlet/ekp/checkout, passing the following query string parameters in the URL.
| Name |
Value |
Example |
cart |
Space-delimited list of item IDs |
course1/EKP000000200 course2/EKP000000400 |
onSuccess |
URL to which the customer will be redirected after a successful payment (optional) |
https://store.example.com/success |
onFailure |
URL to which the customer will be redirected if the payment is cancelled (optional) |
https://store.example.com/cancel |
After percent-encoding the parameter values, the full URL would look as below.
https://www.example.com/ekp/servlet/ekp/checkout?cart=course1%2FEKP000000200+course2%2FEKP000000400&onSuccess=https%3A%2F%2Fstore.example.com%2Fsuccess&onFailure=https%3A%2F%2Fstore.example.com%2Fcancel
Note that both onSuccess and onFailure must, if provided, refer to a trusted app.
Talent Suite will initiate the configured payment process, and make the selected courses available to the customer if payment is successful.
By using the Checkout API together with a payment plugin, you can customize the entire shopping process, from storefront to completion of payment.
We hope this new checkout process provides a smoother experience for your customers, and helps them get to your content faster.