django-oscar-api-checkout
An extension on top of django-oscar-api providing a more flexible checkout API with a pluggable payment methods interface.
Compatible Payment Plugins
django-oscar-cybersource: Provides order payment using Cybersource Secure Acceptance Silent Order POST for PCI SAQ A-EP compliant credit card processing.
django-oscar-wfrs: Provides order payment using financing via the Wells Fargo Retail Services SOAP API.
Installation
Install django-oscar-api using the documentation.
Install the django-oscar-api-checkout package.:
$ pip install django-oscar-api-checkout
Add oscarapicheckout to your INSTALLED_APPS:
# myproject/settings.py ... INSTALLED_APPS = [ ... 'oscarapicheckout', ] + get_core_apps([]) ...Configure Oscar’s order status pipeline.:
# myproject/settings.py ... # Needed by oscarapicheckout ORDER_STATUS_PENDING = 'Pending' ORDER_STATUS_PAYMENT_DECLINED = 'Payment Declined' ORDER_STATUS_AUTHORIZED = 'Authorized' # Other statuses ORDER_STATUS_SHIPPED = 'Shipped' ORDER_STATUS_CANCELED = 'Canceled' # Pipeline Config OSCAR_INITIAL_ORDER_STATUS = ORDER_STATUS_PENDING OSCARAPI_INITIAL_ORDER_STATUS = ORDER_STATUS_PENDING OSCAR_ORDER_STATUS_PIPELINE = { ORDER_STATUS_PENDING: (ORDER_STATUS_PAYMENT_DECLINED, ORDER_STATUS_AUTHORIZED, ORDER_STATUS_CANCELED), ORDER_STATUS_PAYMENT_DECLINED: (ORDER_STATUS_AUTHORIZED, ORDER_STATUS_CANCELED), ORDER_STATUS_AUTHORIZED: (ORDER_STATUS_SHIPPED, ORDER_STATUS_CANCELED), ORDER_STATUS_SHIPPED: (), ORDER_STATUS_CANCELED: (), } OSCAR_INITIAL_LINE_STATUS = ORDER_STATUS_PENDING OSCAR_LINE_STATUS_PIPELINE = { ORDER_STATUS_PENDING: (ORDER_STATUS_SHIPPED, ORDER_STATUS_CANCELED), ORDER_STATUS_SHIPPED: (), ORDER_STATUS_CANCELED: (), }Configure what payment methods are enabled and who can use them.:
# myproject/settings.py ... API_ENABLED_PAYMENT_METHODS = [ { 'method': 'oscarapicheckout.methods.Cash', 'permission': 'oscarapicheckout.permissions.StaffOnly', }, { 'method': 'some.other.methods.CreditCard', 'permission': 'oscarapicheckout.permissions.Public', }, ]Add oscarapicheckout to your root URL configuration directly before oscarapi.:
# myproject/urls.py ... from django.apps import apps from oscarapi.app import application as oscar_api from oscarapicheckout.app import application as oscar_api_checkout urlpatterns = patterns('', ... url(r'^api/', include(apps.get_app_config("oscarapicheckout").urls[0])), # Must be before oscar_api.urls url(r'^api/', include(oscar_api.urls)), ... )
Usage
These are the basic steps to add an item to the basket and checkout using the API.
Add an item to the basket.:
POST /api/basket/add-product/ { "url": "/api/products/1/", "quantity": 1 }List the payment methods available to the current user.:
GET /api/checkout/payment-methods/
Submit the order, specifying which payment method(s) to use.:
POST /api/checkout/ { "guest_email": "joe@example.com", "basket": "/api/baskets/1/", "shipping_address": { "first_name": "Joe", "last_name": "Schmoe", "line1": "234 5th Ave", "line4": "Manhattan", "postcode": "10001", "state": "NY", "country": "/api/countries/US/", "phone_number": "+1 (717) 467-1111", }, "billing_address": { "first_name": "Joe", "last_name": "Schmoe", "line1": "234 5th Ave", "line4": "Manhattan", "postcode": "10001", "state": "NY", "country": "/api/countries/US/", "phone_number": "+1 (717) 467-1111", }, "payment": { "cash": { "enabled": true, "amount": "10.00", }, "creditcard": { "enabled": true, "pay_balance": true, } } }Check the status of each enabled payment option.:
GET /api/checkout/payment-states/
Metadata
Release files for django-oscar-api-checkout 3.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_oscar_api_checkout-3.11.0.tar.gz | 148.6 kB | With provenance | Details for django_oscar_api_checkout-3.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_oscar_api_checkout-3.11.0-py3-none-any.whl | Python 3 | none | any | Details for django_oscar_api_checkout-3.11.0-py3-none-any.whl |
Total release size: 201.3 kB
Release files / django_oscar_api_checkout-3.11.0.tar.gz
| Download URL | django_oscar_api_checkout-3.11.0.tar.gz |
|---|---|
| Size | 148.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63ee267a116b3277475bd7681e31f0a6612d021872bd347fad94afe0c2660d6c
|
|
BLAKE2b-256 checksum How to use checksums |
a571a55143a029edc53feae454d9c4aa2c3f6ad3a16844b9a04cb826a08c366b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / django_oscar_api_checkout-3.11.0-py3-none-any.whl
| Download URL | django_oscar_api_checkout-3.11.0-py3-none-any.whl |
|---|---|
| Size | 52.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d81243958bba22b8ab796e884d127aa5ea72563a22766ca1542d09a1b451ee15
|
|
BLAKE2b-256 checksum How to use checksums |
563f1870e0191d79a88a0f28c71642bc4c1a810697207909c4843277c134cb8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for django-oscar-api-checkout 3.11.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for django_oscar_api_checkout-3.11.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Oct 30, 2026.
Transparency logA 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.