Skip to main content

A django app plugin to add a new API to Open edX for external checkouts. The plugin redirects the user the desired external ecommerce service upon clicking the Upgrade button in LMS dashboard or Learning MFE.

Version Compatibility

For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.

Installation

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • LMS

Configuration

1) edx-platform configuration (Environment/Settings)

  • You might need to add the following configuration values to the config file in Open edX. For any release after Juniper, that config file is /edx/etc/lms.yml. If you’re using private.py, add these values to lms/envs/private.py. These should be added to the top level. Ask a fellow developer or devops for these values.

    MARKETING_SITE_CHECKOUT_URL = <MARKETING_SITE_CHECKOUT_URL>  # The URL of checkout/cart API in your marketing site
    ECOMMERCE_PUBLIC_URL_ROOT = <LMS_BASE_URL>  # Because we want to use external ecommerce using this API plugin for redirection
  • For Tutor installations, these values can also be managed through a custom tutor plugin.

2) edx-platform configuration (Django Admin)

1. Create a new ecommerce configuration in http://<LMS_BASE>/admin/commerce/commerceconfiguration with following values:

    a. Set value for "Basket checkout page" to "/checkout-external/". (When set, the ecommerce will redirect the `Upgrade Course` requests to this plugin)

    b. "Enabled" checked.

    c. "Checkout on ecommerce service" checked.

    d. Other values are arbitrary, but you can fill them out as per your need.

2. Make sure to create CourseModes(e.g. "Verified") for the courses with non-empty and unique SKU value.

How To Use

The API supports a GET call with SKU as query parameter.

API Request

To manually call the API, Send a GET request to <LMS_BASE>/checkout-external?sku=<sku_id>:

A sample request looks like below:

http://local.openedx.io:8000/checkout-external?sku=ABC45F

API Response

The successful response would be a redirect to the marketing site with 302 status code and a failure response would be a 400 status code with basic error fields.

With 302 status code (If your marketing checkout URL is "https://<marketing_site_base>/checkout") the resulting redirect would be:

https://<marketing_site_base>/checkout/?course_id=<course_id against the sku in CourseMode>
With 400 status code

{
    "developer_message": "<Message for the developer>",
    "error_code": "internal_error"
}

Metadata

Release files for ol-openedx-checkout-external 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-openedx-checkout-external 0.3.0
File Size Uploaded Provenance Actions
ol_openedx_checkout_external-0.3.0.tar.gz 4.7 kB Without provenance Details for ol_openedx_checkout_external-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-openedx-checkout-external 0.3.0
File Interpreter ABI Platform Actions
ol_openedx_checkout_external-0.3.0-py3-none-any.whl Python 3 none any Details for ol_openedx_checkout_external-0.3.0-py3-none-any.whl

Total release size: 12.1 kB

Release files / ol_openedx_checkout_external-0.3.0.tar.gz

Download URL ol_openedx_checkout_external-0.3.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2c616feb0bf384aa434477aa978979d874bb47f8598da37453a90d7c723f4078
BLAKE2b-256 checksum
How to use checksums
c8c772c48190216fe55c2b2ab05086af211a01882b10facc7b0d414d35d91da8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ol_openedx_checkout_external-0.3.0-py3-none-any.whl

Download URL ol_openedx_checkout_external-0.3.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a1d956185f6b171f7b17681c6373ab871e7d874cba851222b42f25471c5dbf1
BLAKE2b-256 checksum
How to use checksums
78fd159627cd724ef682759ddce108c5e56f62cb8d183db0c8cba8c03106a926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ol-openedx-checkout-external 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page