traPtitech / traPtitech/Checkin

invoices.create の請求書メール送信フローを決める

Open
#19 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
3d 5h
Merged PRs (30d)
7

Description

背景

現状 invoices.create は Invoice を作成 → 明細を追加 → finalizeInvoice で確定し、支払い URL(payment_url。中身は Stripe の hosted_invoice_url)を返すが、顧客への請求書メール送信を行う sendInvoice を呼んでいないcollection_method: 'send_invoice'auto_advance: false の組み合わせでは、finalizeInvoice による確定だけでは顧客に請求書メールは届かず、sendInvoice の明示的な呼び出しが必要になる(Stripe の挙動)。

決めること

会員フロー(#18)では、大学メールアドレスへの請求書到着が本人確認(メールアドレスの所有確認)や支払い導線になり得る。以下のどちらにするかを #18 のフロー確定と併せて決める。

  • (a) finalizeInvoice の後に sendInvoice を呼び、顧客へメール送信する
  • (b) メールは送らず、フロントが payment_url を扱う

注意(認可前提)

無認証のまま任意宛先へ請求書メールを送れると、送信者評価を悪用した嫌がらせ・フィッシングの経路になる。メール送信を採る場合は #15 の認可(customer をセッションからサーバー導出)を前提にする。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the invoices.create entry point and trace the existing finalizeInvoice flow, including payment_url. Read issues #18 and #15 to understand the member flow and authorization prerequisite, then compare the implications of sendInvoice versus frontend payment_url handling. Done means the flow is decided consistently with those issues and the authorization requirement is accounted for.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend-api-design, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.