Ecommerce Current Workflow
This document details the working of the current system to help with the understanding of the process of purchasing a course from the click on the enroll button to viewing the course content.
The intention behind doing this is to identify the different parts of ecommerce system, their working with other IDAs, and within the ecommerce system to exactly identify the parts that would be affected by the introduction of mobile in-app purchases.
Basic workflow
Note: It is presumed that the user is already signed in and is present on the course detail page of the to-be-purchased course
The following steps iterate the flow that takes place when a learner clicks enroll button on a Verified/Professional course detail page or the Upgrade to Verified button on the LMS dashboard:
The learner is taken to the checkout page on ecommerce.
The learner selects the payment method.
The learner enters the required financial details and clicks on the Place Order button.
The payment is verified by the system and an open order is placed.
The order is then fulfilled by the system by updating the enrollment of the user.
The learner is displayed the order receipt upon successful fulfillment.
The user then visits the dashboard where the gated content has been unlocked.
The following sequence diagram describes the sequence with which all steps take place for a successful course seat purchase.
Page Api calls | Key Api requests | Purpose | Sample Data with key attributes |
---|---|---|---|
Learner clicks on {ecommerce}/basket/add/?sku={sku id} and is redirected to following page(Checkout Page) https://payment.edx.org/ | {lms}/api/user/v1/accounts/username
| Get user account information |
|
{ecommerce}/bff/payment/v0/payment/ | Api for retrieving basket contents and checkout/payment options. | {"basket_id":151033,"is_free_basket":false,"currency":"USD","products":[{"course_key":"course-v1:ColumbiaX+CSMM.104x+1T2017","sku":"1BCDF4C","title":"Animation and CGI Motion","product_type":"Seat","certificate_type":"verified"}],"summary_price":100.0,"summary_discounts":0.0,"order_total":100.0,"offers":[],"show_coupon_form":true,"coupons":[]} | |
{ecommerce}/bff/payment/v0/capture-context/ | Returns capture context token |
| |
{ecommerce}/api/discounts/course/course-v1:edX+edx201+1T2020 | Get course discount information. | Discount_applicable: false, jwt | |
Order completion page | {ecommerce}/csrf/api/v1/token | Get csrf token. |
|
{ecommerce}/payment/cybersource/authorize/ |
| Posts these attribbutes on ecommerce
{payment token} |