Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Sponsorship: Stripe Checkout endpoint (Phase 7.2)

Aperta
#15 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
csharp
Ambito
api, backend, payments

Direzione di ricerca

L’endpoint deve trovarsi nell’implementazione di IEndpointModule.MapEndpoints del modulo Sponsorship; prima conferma i tiers e i price IDs di Dependency #14. Usa il pattern dell’harness xUnit referenziato in tests/CommunityPro.Tests//, con Members/MembersTestHarness.cs come esempio. Il lavoro è completato quando superano entrambi i test fake-Stripe di subscription e custom-payment, inclusi bounds, metadati, URL ed error codes stabili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

sponsorship

Scope

POST /sponsorship/checkout — anonymous (sponsors are not members). Creates a Stripe Checkout Session and returns its URL for redirect.

Request

{ "tierId": "…", "billingPeriod": "monthly|annual", "orgName": "…", "contactEmail": "…" }

or, for a custom one-off contribution:

{ "customAmountCents": 50000, "currency": "usd", "orgName": "…", "contactEmail": "…" }

Rules

  • Tier path: mode=subscription with the tier's monthly/annual price id. Custom path: mode=payment with an ad-hoc price-from-amount (sane min/max bounds).
  • customer_creation=always; prefill org name + email; success URL → {frontend}/sponsors/thanks, cancel URL → /sponsors.
  • No Sponsor row is created here — activation happens in the webhook ticket {{S3}} on checkout.session.completed (pass tierId/orgName through Checkout metadata).
  • Endpoint is unauthenticated → validate inputs hard and rate-limit-friendly (no DB writes, no email sends).

Error codes

sponsorship.tier_not_found, sponsorship.invalid_amount, sponsorship.invalid_request

Dependencies

Blocked by #14 (tiers + price ids).

Acceptance criteria

  • Subscription session built with correct price id per billing period
  • Custom amount bounds enforced
  • Metadata carries everything {{S3}} needs to build the Sponsor
  • Fake-Stripe tests for both modes
Conventions (project-wide, non-negotiable)
  • .NET 9, records for immutable shapes, file-scoped namespaces, primary constructors where they read well. Minimal-API endpoints grouped per module via IEndpointModule.MapEndpoints.
  • Result<T> (SharedKernel) instead of exception-driven control flow. Endpoint results map failures to ProblemDetails with the stable error codes listed above — the frontend keys off them.
  • Module owns its EF Core DbContext mapped to its own Postgres schema. Modules never reference each other's internals — cross-module needs go through a public contract interface or an in-process domain event (IEventPublisher).
  • All external calls (GitHub, Stripe, Brevo, Cloudinary, Meilisearch) behind interfaces owned by the consuming module.
  • Every list endpoint paginated (offset is fine). xUnit tests in tests/CommunityPro.Tests/<Module>/ following the existing harness patterns (see Members/MembersTestHarness.cs).
Lingua principale
C#
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommunityPro/community-pro-api

Tutte le issue di CommunityPro/community-pro-api

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.