{"id":16417496,"url":"https://github.com/oscarychen/drf-stripe-subscription","last_synced_at":"2026-01-16T11:49:31.687Z","repository":{"id":37383026,"uuid":"445411467","full_name":"oscarychen/drf-stripe-subscription","owner":"oscarychen","description":"An out-of-box Django REST framework solution for payment and subscription management using Stripe.","archived":false,"fork":false,"pushed_at":"2025-08-20T13:56:25.000Z","size":97,"stargazers_count":120,"open_issues_count":5,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-26T20:41:25.693Z","etag":null,"topics":["billing","django","payment","payments","rest-api","stripe","subscription","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oscarychen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-07T05:42:18.000Z","updated_at":"2025-08-20T13:56:29.000Z","dependencies_parsed_at":"2024-01-05T15:34:34.514Z","dependency_job_id":"744a7cc0-0c54-482f-8109-83a0a245eb83","html_url":"https://github.com/oscarychen/drf-stripe-subscription","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":0.1470588235294118,"last_synced_commit":"2f845a8e58059d07771468831517b4a61738498c"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/oscarychen/drf-stripe-subscription","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarychen%2Fdrf-stripe-subscription","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarychen%2Fdrf-stripe-subscription/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarychen%2Fdrf-stripe-subscription/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarychen%2Fdrf-stripe-subscription/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oscarychen","download_url":"https://codeload.github.com/oscarychen/drf-stripe-subscription/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarychen%2Fdrf-stripe-subscription/sbom","scorecard":{"id":713301,"data":{"date":"2025-08-11","repo":{"name":"github.com/oscarychen/drf-stripe-subscription","commit":"83cf9e3080f5fc9603790badc5323f90c3053402"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":5,"reason":"Found 11/22 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/oscarychen/drf-stripe-subscription/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/oscarychen/drf-stripe-subscription/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: env_setup.sh:26","Warn: pipCommand not pinned by hash: env_setup.sh:27","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:26","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"32 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-190 / GHSA-2gwj-7jmv-h26r","Warn: Project is vulnerable to: PYSEC-2023-13 / GHSA-2hrw-hx67-34x6","Warn: Project is vulnerable to: PYSEC-2022-1 / GHSA-53qw-q765-4fww","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2022-20 / GHSA-6cw3-g6wv-c2xv","Warn: Project is vulnerable to: PYSEC-2023-225 / GHSA-7h4p-27mh-hmrw","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2022-2 / GHSA-8c5j-9r9f-c6w8","Warn: Project is vulnerable to: PYSEC-2022-245 / GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2022-19 / GHSA-95rw-fx8r-36v6","Warn: Project is vulnerable to: PYSEC-2023-226 / GHSA-h8gc-pgj2-vjm3","Warn: Project is vulnerable to: PYSEC-2023-100 / GHSA-jh3w-4vvf-mjgr","Warn: Project is vulnerable to: PYSEC-2022-3 / GHSA-jrh2-hc4r-7jwx","Warn: Project is vulnerable to: PYSEC-2022-213 / GHSA-p64x-8rxx-wf6q","Warn: Project is vulnerable to: PYSEC-2021-99 / GHSA-p99v-5w3c-jqq9","Warn: Project is vulnerable to: PYSEC-2023-12 / GHSA-q2jf-h9jm-m7p4","Warn: Project is vulnerable to: PYSEC-2021-8 / GHSA-qm57-vhq3-3fwf","Warn: Project is vulnerable to: PYSEC-2023-222 / GHSA-qmf9-6jqf-j8fq","Warn: Project is vulnerable to: PYSEC-2022-304 / GHSA-qrw5-5h28-6cmg","Warn: Project is vulnerable to: PYSEC-2023-61 / GHSA-r3xc-prgr-mg9p","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2021-7 / GHSA-rxjp-mfm9-w4wr","Warn: Project is vulnerable to: PYSEC-2021-439 / GHSA-v6rh-hp5x-86rv","Warn: Project is vulnerable to: PYSEC-2024-47 / GHSA-vm8q-m57g-pff3","Warn: Project is vulnerable to: PYSEC-2022-191 / GHSA-w24h-v9qh-8gxj","Warn: Project is vulnerable to: PYSEC-2021-109 / GHSA-xpfp-f569-q3p2","Warn: Project is vulnerable to: PYSEC-2024-28 / GHSA-xxj9-f6rv-m3x4","Warn: Project is vulnerable to: PYSEC-2020-263 / GHSA-fx83-3ph3-9j2q","Warn: Project is vulnerable to: GHSA-gw84-84pc-xp82","Warn: Project is vulnerable to: PYSEC-2021-47 / GHSA-5jqp-qgf6-3pvh","Warn: Project is vulnerable to: GHSA-mr82-8j83-vxmv","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:45:24.699Z","repository_id":37383026,"created_at":"2025-08-22T08:45:24.699Z","updated_at":"2025-08-22T08:45:24.699Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["billing","django","payment","payments","rest-api","stripe","subscription","webhook"],"created_at":"2024-10-11T07:11:32.552Z","updated_at":"2026-01-16T11:49:26.672Z","avatar_url":"https://github.com/oscarychen.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# drf-stripe-subscription\n\n[![CI tests](https://github.com/oscarychen/drf-stripe-subscription/actions/workflows/test.yml/badge.svg)](https://github.com/oscarychen/drf-stripe-subscription/actions/workflows/test.yml)\n[![Package Downloads](https://img.shields.io/pypi/dm/drf-stripe-subscription)](https://pypi.org/project/drf-stripe-subscription/)\n\nAn out-of-box Django REST framework solution for payment and subscription management using Stripe. The goal of this\npackage is to utilize Stripe provided UI and features as much as possible to manage subscription product models. This\npackage helps you make use of Stripe's hosted UI for customer checkout, billing management, as well as for admin to\nmanage product, pricing, and customer subscriptions.\n\n- Django data models representing Stripe data objects\n- Supports Stripe Webhook for managing changes with your products, prices, and customer subscriptions\n- Django management commands for synchronizing data with Stripe\n- Django REST API endpoints supporting Stripe Checkout Session and Customer Portal\n\n## Installation \u0026 Setup\n\n```commandline\npip install drf-stripe-subscription\n```\n\nInclude the following drf_stripe settings in Django project settings.py:\n\n```python\nDRF_STRIPE = {\n    \"STRIPE_API_SECRET\": \"my_stripe_api_key\",\n    \"STRIPE_WEBHOOK_SECRET\": \"my_stripe_webhook_key\",\n    \"FRONT_END_BASE_URL\": \"http://localhost:3000\",\n}\n```\n\nInclude drf_stripe in Django INSTALLED_APPS setting:\n\n```python\nINSTALLED_APPS = (\n    ...,\n    \"rest_framework\",\n    \"drf_stripe\",\n    ...\n)\n```\n\nInclude drf_stripe.url routing in Django project's urls.py, ie:\n\n```python\nfrom django.urls import include, path\n\nurlpatterns = [\n    path(\"stripe/\", include(\"drf_stripe.urls\")),\n    ...\n]\n```\n\nRun migrations command:\n\n```commandline\npython manage.py migrate\n```\n\nPull data from Stripe into Django database using the following command:\n\n```commandline\npython manage.py pull_stripe\n```\n\nFinally, start Django development server\n\n```commandline\npython manage.py runserver\n```\n\nas well as Stripe CLI to forward Stripe webhook requests:\n\n```commandline\nstripe listen --forward-to 127.0.0.1:8000/stripe/webhook/\n```\n\n## Usage\n\nThe following REST API endpoints are provided:\n\n### List product prices to subscribe\n\n```\nmy-site.com/stripe/subscribable-product/\n```\n\nThis endpoint is available to both anonymous users and authenticated users. Anonymous users will see a list of all\ncurrently available products. For authenticated users, this will be a list of currently available products without any\nproducts that the user has already subscribed currently.\n\n### List user's current subscriptions\n\n```\nmy-site.com/stripe/my-subscription/\n```\n\nThis endpoint provides a list of active subscriptions for the current user.\n\n### List user's current subscription items\n\n```\nmy-site.com/stripe/my-subscription-items/\n```\n\nThis endpoint provides a list of active subscription items for the current user.\n\n### Create a checkout session using Stripe hosted Checkout page\n\n```\nmy-site.com/stripe/checkout/\n```\n\nThis endpoint creates Stripe Checkout Session\n\nMake request with the follow request data:\n\n```{\"price_id\": \"price_stripe_price_id_to_be_checked_out\"}```\n\nThe response will contain a session_id which can be used by Stripe:\n\n```{\"session_id\": \"stripe_checkout_session_id\"}```\n\nThis session_id is a unique identifier for a Stripe Checkout Session, and can be used\nby [`redirectToCheckout` in Stripe.js](https://stripe.com/docs/js/checkout/redirect_to_checkout). You can implement this\nin your frontend application to redirect to a Stripe hosted Checkout page after fetching the session id.\n\nBy default, the Stripe Checkout page will redirect the user back to your application at\neither `mysite.com/payment/session={CHECKOUT_SESSION_ID}` if the checkout is successful,\nor `mysite.com/manage-subscription/` if checkout is cancelled.\n\n### Stripe Customer Portal\n\n```\nmysite.com/stripe/customer-portal\n```\n\nThis will create a Stripe billing portal session, and return the url to that session:\n\n```{\"url\": \"url_to_Stripe_billing_portal_session\"```\n\nThis is a link that you can use in your frontend application to redirect a user to Stripe Customer Portal and back to\nyour application. By default, Stripe Customer Portal will redirect the user back to your frontend application\nat `my-site.com/manage-subscription/`\n\n### Stripe Webhook\n\n```\nmysite.com/stripe/webhook/\n```\n\nThis the REST API endpoint Stripe servers can call to update your Django backend application. The following Stripe\nwebhook events are currently supported:\n\n```\nproduct.created\nproduct.updated\nproduct.deleted\nprice.created\nprice.updated\nprice.deleted\ncustomer.subscription.created\ncustomer.subscription.updated\ncustomer.subscription.deleted\n```\n\nWith these Stripe events, you can:\n\n- Manage your products and pricing model from Stripe Portal, and rely on webhook to update your Django application\n  automatically.\n- Manage your customer subscriptions from Stripe Portal, and rely on webhook to update your Django application\n  automatically.\n\n## StripeUser\n\nThe StripeUser model comes with a few attributs that allow accessing information about the user quickly:\n\n```python\nfrom drf_stripe.models import StripeUser\n\nstripe_user = StripeUser.objects.get(user_id=django_user_id)\n\nprint(stripe_user.subscription_items)\nprint(stripe_user.current_subscription_items)\nprint(stripe_user.subscribed_products)\nprint(stripe_user.subscribed_features)\n```\n\n## Customizing Checkout Session Parameters\n\nSome of the checkout parameters are specified in `DRF_STRIPE` settings:\n\n`CHECKOUT_SUCCESS_URL_PATH`: The checkout session success redirect url path.\n\n`CHECKOUT_CANCEL_URL_PATH`: The checkout session cancel redirect url path.\n\n`PAYMENT_METHOD_TYPES`: The default [payment method types](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types)\n, defaults to `[\"card\"]`.\n\n`DEFAULT_CHECKOUT_MODE`: The default checkout mode, defaults to `\"subscription\"`.\n\nBy default, you can create a checkout session by calling the default REST endpoint `my-site.com/stripe/checkout/`, this\nREST endpoint utilizes `drf_stripe.serializers.CheckoutRequestSerializer` to validate checkout parameters and create a\nStripe Checkout Session. Only a `price_id` is needed, `quantity` defaults to 1.\n\nYou can extend this serializer and customize Checkout behavior, such as specifying multiple `line_items`\n, `payment_method_types`, and `checkout_mode`:\n\n```python\nfrom drf_stripe.stripe_api.customers import get_or_create_stripe_user\nfrom drf_stripe.stripe_api.checkout import stripe_api_create_checkout_session\nfrom drf_stripe.serializers import CheckoutRequestSerializer\nfrom rest_framework.exceptions import ValidationError\nfrom stripe.error import StripeError\n\n\nclass CustomCheckoutRequestSerializer(CheckoutRequestSerializer):\n    \"\"\"Handle creation of a custom checkout session where parameters are customized.\"\"\"\n\n    def validate(self, attrs):\n        stripe_user = get_or_create_stripe_user(user_id=self.context['request'].user.id)\n        try:\n            checkout_session = stripe_api_create_checkout_session(\n                customer_id=stripe_user.customer_id,\n                line_items=[\n                    {\"price_id\": \"stripe_price_id\", \"quantity\": 2}, ...\n                ],\n                payment_method_types=[\"card\", \"alipay\", ...],\n                checkout_mode=\"subscription\")\n            attrs['session_id'] = checkout_session['id']\n        except StripeError as e:\n            raise ValidationError(e.error)\n        return attrs\n```\n\nFor more information regarding `line_items`, `payment_method_types`, `checkout_mode`, checkout Stripe documentation for\n[creating a checkout session](https://stripe.com/docs/api/checkout/sessions/create).\n\n## Product features\n\nStripe does not come with a way of managing features specific to your products and application. drf-stripe-subscription\nprovides additional tables to manage features associated with each Stripe Product:\n\n- Feature: this table contains feature_id and a description for the feature.\n- ProductFeature: this table keeps track of the many-to-many relation between Product and Feature.\n\nTo assign features to a product, go to Stripe Dashboard -\u003e `Products` -\u003e `Add Product`/`Edit Product`:\nUnder `Product information`, click on `Additional options`, `add metadata`.\n\nAdd an entry called `features`, the value of the entry should be a space-delimited string describing a set of features,\nie: `FEATURE_A FEATURE_B FEATURE_C`.\n\nIf you have Stripe CLI webhook running, you should see that your Django server has automatically received product\ninformation update, and created/updated the associated ProductFeature and Feature instances. Otherwise, you can also run\nthe `python manage.py update_stripe_products` command again to synchronize all of your product data. The `description`\nattribute of each Feature instance will default to the same value as `feature_id`, you should update the `description`\nyourself if needed.\n\n## Django management commands\n\n```commandline\npython manage.py pull_stripe\n```\n\nThis command calls `update_stripe_products`, `update_stripe_customers`, `update_stripe_subscriptions` commands.\n\n```commandline\npython manage.py update_stripe_products\n```\n\nPulls products and prices from Stripe and updates Django database.\n\n```commandline\npython manage.py update_stripe_customers\n```\n\nPulls customers from Stripe and updates Django database.\n\n```commandline\npython manage.py update_stripe_subscriptions\n```\n\nPulls subscriptions from Stripe and updates Django database.\n\n## Working with customized Django User models\n\nThe following DRF_STRIPE settings can be used to customize how Django creates User instance using Stripe Customer\nattributes (default values shown):\n\n```python\nDRF_STRIPE = {\n    \"DJANGO_USER_EMAIL_FIELD\": \"email\",\n    \"USER_CREATE_DEFAULTS_ATTRIBUTE_MAP\": {\"username\": \"email\"},\n    \"DJANGO_USER_MODEL\": None,\n}\n```\n\nThe `DJANGO_USER_EMAIL_FIELD` specifies name of the Django User attribute to be used to store Stripe Customer email. It\nwill be used to look up existing Django User using Stripe Customer email.\n\nThe `USER_CREATE_DEFAULTS_ATTRIBUTE_MAP` maps the name of Django User attribute to name of corresponding Stripe Customer\nattribute, and is used during the automated Django User instance creation.\n\nThe `DJANGO_USER_MODEL` is optional in case you are not using Django's default user model (nor the model you may have configured using Django's `AUTH_USER_MODEL`) for your users you wish to associate with Stripe customers.\nIn this case specify the model you wish to use using a dotted pair - the label of the Django app (which must be in your INSTALLED_APPS), and the name of the Django model that you wish to use.\nFor example:\n```python\nDRF_STRIPE = {\n   \"DJANGO_USER_MODEL\": \"myapp.MyUser\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarychen%2Fdrf-stripe-subscription","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscarychen%2Fdrf-stripe-subscription","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarychen%2Fdrf-stripe-subscription/lists"}