{"id":30616541,"url":"https://github.com/soulee-dev/payapp-fastapi-demo","last_synced_at":"2025-08-30T09:41:46.039Z","repository":{"id":311402483,"uuid":"1043627289","full_name":"soulee-dev/PayApp-FastAPI-Demo","owner":"soulee-dev","description":"사업자없이 결제 가능한 PG인 PayApp 서비스 FastAPI Demo 프로젝트입니다.","archived":false,"fork":false,"pushed_at":"2025-08-24T09:22:22.000Z","size":3477,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T14:24:42.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/soulee-dev.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-08-24T09:18:18.000Z","updated_at":"2025-08-24T11:22:00.000Z","dependencies_parsed_at":"2025-08-24T14:26:04.064Z","dependency_job_id":"d90d6e4b-c4e5-45d2-b6d2-be344f11ad83","html_url":"https://github.com/soulee-dev/PayApp-FastAPI-Demo","commit_stats":null,"previous_names":["soulee-dev/payapp-fastapi-demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/soulee-dev/PayApp-FastAPI-Demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulee-dev%2FPayApp-FastAPI-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulee-dev%2FPayApp-FastAPI-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulee-dev%2FPayApp-FastAPI-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulee-dev%2FPayApp-FastAPI-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soulee-dev","download_url":"https://codeload.github.com/soulee-dev/PayApp-FastAPI-Demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulee-dev%2FPayApp-FastAPI-Demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272833294,"owners_count":25000870,"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-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2025-08-30T09:41:45.350Z","updated_at":"2025-08-30T09:41:45.960Z","avatar_url":"https://github.com/soulee-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PAYAPP FastAPI 데모\n![Demo GIF Video](./docs/demo.gif)\n\n![GitHub Repo stars](https://img.shields.io/github/stars/soulee-dev/PayApp-FastAPI-Demo?style=flat)\n![GitHub forks](https://img.shields.io/github/forks/soulee-dev/PayApp-FastAPI-Demo?style=flat)\n\n온라인 비즈니스를 만들기 위해 가장 중요한 요소 중 하나는 **결제 시스템**입니다.\n하지만 대부분의 PG(Payment Gateway)사는 **사업자등록증이 없는 개인**의 결제를 받아주지 않습니다.\n\n이 문제를 해결하기 위해 송금 스크래핑 방식도 고려해봤지만, 최근에 **개인 결제를 지원하는 [PAYAPP](https://www.payapp.kr/homepage/index.html)** 서비스를 찾게 되었습니다.\n\n* 가입 즉시 결제를 받을 수 있음\n* 정산 시 구비서류 제출 필요\n* **보증보험 가입 조건**: 건당 결제금액 50만원 이상 **또는** 월 매출 500만원 이상일 경우\n* **수수료**: 카드 4%, 계좌이체 2.3%\n  → Toss Payments(카드 3.4%, 계좌 2.0%)보다 높지만, **가입비/관리비 0원 \u0026 개인도 가입 가능**하다는 장점이 있습니다.\n\n아쉬운 점은 **Toss Payments**처럼 개발자 문서가 친절하지 않다는 점입니다.\n그래서 **FastAPI + SQLite + 바닐라 JS** 기반으로 PAYAPP 결제 시스템을 구현해보았습니다.\n\n자세한 정보는 [PayApp 서비스 연동 매뉴얼](https://www.payapp.kr/dev_center/dev_center01.html)을 참고하세요.\n\n---\n\n## 기능 개요\n\n* **상품/주문 DB**: SQLite로 관리\n* **/orders API**: 서버가 상품 가격을 확정하고 주문 생성\n* **프론트엔드(index.html)**: 서버가 내려준 금액/주문번호를 그대로 PayApp SDK에 전달\n* **/webhook API**: PayApp이 결제 결과를 알려줌 → 서버에서 주문 상태 업데이트\n* **/result API**: 결제 결과를 조회 가능\n\n---\n\n## 프로젝트 구조\n\n```\n.\n├─ .env.example        # 환경 변수 예시\n├─ static/\n│  └─ index.html       # 프론트엔드(바닐라 JS)\n└─ app/\n   ├─ __init__.py\n   ├─ main.py          # FastAPI 앱 엔트리포인트\n   ├─ config.py        # 환경변수 로딩\n   ├─ db.py            # DB 연결 및 초기화\n   ├─ models.py        # Pydantic 모델 \u0026 Enum\n   ├─ repositories.py  # DB CRUD\n   └─ routers/\n      ├─ orders.py     # 주문 생성/조회 API\n      └─ webhook.py    # PayApp Webhook API\n```\n\n---\n\n## 설정\n\n### 1. PayApp 가입 및 연동 정보 확인\n\n[PayApp 가입하기](https://www.payapp.kr/homepage/index.html)\n\n* 판매관리자 → **설정 → 연동정보**에서 **연동 KEY / 연동 VALUE** 확인\n* `.env` 파일에 입력\n\n### 2. 환경 변수 설정\n\n`.env.example` 파일을 참고하여 `.env` 파일을 생성하고 값을 채워주세요.\n\n```bash\nPAYAPP_USERID=판매자아이디\nPAYAPP_LINKKEY=연동KEY\nPAYAPP_LINKVAL=연동VALUE\nSHOP_NAME=내쇼핑몰\nBASE_URL=http://localhost:8000\n```\n\n\u003e 로컬에서 ngrok으로 외부 접근을 열 경우, `BASE_URL`을 ngrok 주소로 바꿔야 Webhook이 정상 수신됩니다.\n\n---\n\n## 설치\n\n```bash\npip install -r requirements.txt\n```\n\n---\n\n## 실행\n\n```bash\n# 개발 서버 실행\nuvicorn app.main:app --reload\n```\n\n혹은 FastAPI CLI를 사용할 수도 있습니다:\n\n```bash\nfastapi dev app/main.py\n```\n\n### ngrok을 통한 외부 노출\n\n```bash\nngrok http 8000\n```\n\n생성된 ngrok 주소를 `.env`의 `BASE_URL`로 업데이트하세요.\n\n---\n\n## 테스트 방법\n\n1. 브라우저에서 [http://localhost:8000](http://localhost:8000) 접속\n2. 상품 선택 → `주문 만들기` 클릭\n3. 서버가 가격을 확정하고 주문 생성\n4. `결제하기` 버튼을 눌러 PayApp 결제 진행\n5. 결제 완료 후 PayApp이 `/webhook`으로 결과를 전송 → 서버 DB 상태 업데이트\n6. `/result?order_id=...` 경로에서 주문 상태 확인 가능\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulee-dev%2Fpayapp-fastapi-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoulee-dev%2Fpayapp-fastapi-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulee-dev%2Fpayapp-fastapi-demo/lists"}