Skip to content

An e-commerce RESTful API using django-rest-framework.

Notifications You must be signed in to change notification settings

A-Fayez/ecommerce

Repository files navigation

Table of Contents

Introduction

A simple e-commerce RESTful API, it features:

  • Authentication and Authorization using JWT.
  • Shopping Cart.
  • Payment and Checkout using Stripe.

API Endpoints

Endpoint Available Methods Description
<domain>/api/register POST Registers a user to the api and receiving a new access and refresh JWT token.
<domain>/api/token POST Obtains a new pair of JWT tokens after submitting valid credentials.
<domain>/api/token/refresh POST Obtains a new access token after submitting a valid refresh token.
<domain>/carts POST Creates a new cart resource.
<domain>/carts/<cart-id> GET Obtains user's cart details, only available to authenticated and users who own the cart.
<domain>/checkout POST Creates a new payment resource that will issue necessary billing information for the user.

Technologies

  • Django rest framework
  • PostgreSQL
  • Docker
  • JWT
  • Stripe

Installation

Requirements

Clone the repo and in the project root, run:

$ export STRIPE_API_KEY=<your-key>
$ docker-compose up