Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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}/checkout/receipt/?order_number=EDX-251036&disable_back_button=1

{ecommerce}/csrf/api/v1/token

Get csrf token.

{ecommerce}/payment/cybersource/authorize/

Posts these attribbutes on ecommerce

  • basket: 151036

  • first_name: jawad

  • last_name: khan

  • address_line1: Lahore, Lahore, Lahore, Lahore

  • address_line2: Lahore

  • city: Lahore

  • country: PK

  • state: State/Province

  • postal_code: 54000

  • payment_token:

{payment token}