{"id":29638202,"url":"https://github.com/cecilphillip/recipesapi-stripe-billing","last_synced_at":"2026-05-20T14:07:24.142Z","repository":{"id":305393911,"uuid":"929910633","full_name":"cecilphillip/recipesapi-stripe-billing","owner":"cecilphillip","description":"Sample HTTP API built with .NET that shows Stripe usage based billing","archived":false,"fork":false,"pushed_at":"2025-07-19T19:56:05.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T22:35:22.431Z","etag":null,"topics":["api","asp-net-core","csharp","dotnet","http-api","openiddict","stripe","stripe-billing","stripe-payments"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cecilphillip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-02-09T17:25:09.000Z","updated_at":"2025-07-19T19:56:09.000Z","dependencies_parsed_at":"2025-07-19T22:35:31.068Z","dependency_job_id":"ed50f8f2-5ddd-4724-b40d-6667da7a51a6","html_url":"https://github.com/cecilphillip/recipesapi-stripe-billing","commit_stats":null,"previous_names":["cecilphillip/recipesapi-stripe-billing"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cecilphillip/recipesapi-stripe-billing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cecilphillip%2Frecipesapi-stripe-billing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cecilphillip%2Frecipesapi-stripe-billing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cecilphillip%2Frecipesapi-stripe-billing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cecilphillip%2Frecipesapi-stripe-billing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cecilphillip","download_url":"https://codeload.github.com/cecilphillip/recipesapi-stripe-billing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cecilphillip%2Frecipesapi-stripe-billing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266360036,"owners_count":23917356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","asp-net-core","csharp","dotnet","http-api","openiddict","stripe","stripe-billing","stripe-payments"],"created_at":"2025-07-21T19:06:43.896Z","updated_at":"2026-05-20T14:07:24.099Z","avatar_url":"https://github.com/cecilphillip.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recipes API with Stripe usage based billing\nThis HTTP API sample shows how to implement usage based billing with Stripe and ASP.NET Core.\n\nThe application uses the [fixed fee and overage pricing model](https://docs.stripe.com/billing/subscriptions/usage-based/pricing-models#fixed-fee-overage) for subscriptions. A fixed fee is charged upfront and the overage fee is charged at the beginning of the next billing cycle.\n\n\n## Getting Setup\n\n### Prerequisites\n- [.NET SDK](https://get.dot.net/) 9.0 or later\n- [Stripe account](https://dashboard.stripe.com) \u0026 [Stripe CLI](https://stripe.com/docs/stripe-cli)\n- [Docker](https://www.docker.com)\n- (Optional) [Task](https://taskfile.dev)\n\n### Running the solution\n* Add your [Stripe Secret key](https://dashboard.stripe.com/apikeys)  to the Recipe.Api's [appsettings.Development.json](./src/Recipes.Api/appsettings.json) file.\n* Run the [App Host](./src/Recipes.AppHost) project\n\n### API Endpoints\nAll of the recipe resource endpoints are secured with an access token. The application will bootstrap a default set of\nusers, but you can register your own with the `POST /auth/register` endpoint. Here's a sample payload:\n\n```json\n{\n  \"email\": \"demo@demo.com\",\n  \"password\": \"demo\",\n  \"FullName\": \"Demo User\"\n}\n```\n\nYou can generate an access token for a user by calling the `POST /auth/authenticate` endpoint with the following request:\n\n```http\nPOST /connect/token\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=password\u0026username=demo@demo.com\u0026password=demo\n```\n\nAvailable endpoints\n- `POST /api/recipes` - Create a recipe\n- `GET /api/recipes/random` - Retrieve a random recipe\n- `GET /api/recipes/latest` - Retrieve the latest recipes\n- `GET /api/recipes/category/{category}` - Retrieve all recipes in a category\n- `GET /api/recipes/code/{lookupCode}` - Retrieve a recipe with the specified lookup code\n- `DELETE /api/recipes/code/{lookupCode}` - Remove a recipe with the specified lookup code\n\n### Available Task Commands\nIf you install the Task task runner, you can run the following operations against the project using the syntax `task \u003ctask-name\u003e`. \nFor example, `task requests:generate` will generate a configurable number of request traffic to the API.\n\n`requests:authenticate` - Get and set an access token for the API\n```shell\n  task requests:authenticate\n```\n\n`requests:generate` - Generate requests to the API\n```shell\n  task requests:generate\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcecilphillip%2Frecipesapi-stripe-billing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcecilphillip%2Frecipesapi-stripe-billing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcecilphillip%2Frecipesapi-stripe-billing/lists"}