Payment & Affiliate Services

Backend
Web Dev
Payment & Affiliate Services

Tech Stack

Python
FastAPI
Stripe
MongoDB
Redis
JWT
Docker
Linux

Description

I developed and maintained backend services that powered App For Language (FunFluen)'s payment and affiliate infrastructure using FastAPI, MongoDB, Redis, and Stripe.

The payment service centralized Stripe interactions such as customer creation, checkout sessions, subscription management, and webhook processing, while persisting subscription state in MongoDB for other services to consume.

The affiliate service handled referral links, click tracking, sign-up and purchase attribution, and commission logic. It integrated with the payment flow through Stripe customer metadata and webhook events, allowing referral statistics to be updated without polling.

Together, the services used centralized JWT authentication, Redis-based rate limiting, webhook-driven workflows, and Dockerized deployment as part of a multi-service backend architecture.

  • Built a layered FastAPI payment service that abstracted Stripe SDK operations behind reusable service-level functions.
  • Implemented secure checkout and API authentication using cookie-based token refresh flows and header-based JWT authentication.
  • Implemented Stripe webhook processing with signature verification and idempotent event handling for subscription and payment-related events.
  • Built an affiliate backend for referral links, click tracking, sign-up and purchase attribution, and automated commission calculations.
  • Connected affiliate attribution to the payment flow by storing affiliate codes in Stripe customer metadata and processing Stripe webhook events.
  • Implemented Redis-based rate limiting for referral clicks to reduce bot and click-spam abuse.
  • Used MongoDB for persistent payment and affiliate data and Redis for caching and rate-limiting workloads.
  • Dockerized the services and their database environments for predictable development and deployment.

Page Info

Payment Service

Internal payment infrastructure for Stripe customer management, checkout sessions, subscription management, and webhook processing.

/projects/payment-service/stripe-screenshot.png

Affiliate Service

Referral and commission backend that tracks clicks, sign-ups, and purchases while integrating with Stripe webhooks and Redis-based rate limiting. (No screenshot for some security reasons!You can view further information after contacting me and obtaining permission from my former company).


    Amin Akbari - Backend-first Full-Stack Developer