# TRADOM — インボイス前払い型 (Invoice / Pre-Payment)
## Simplified UX Flow

**Transaction type:** Invoice is issued early and Buyer pays **before** the goods are shipped. Seller ships only after payment is confirmed.

**Legend:**
- 🟢 **[MANUAL]** — User action required
- ⚙️ **[AUTO]** — System / automated process
- 📧 **[EMAIL]** — Automated notification
- ⚠️ **[EDGE]** — Irregular / exception case

**Phases (shared structure with 後払い for comparison):**
1. Inquiry
2. Review (与信審査)
3. Invoice issuance ← **moved earlier vs. 後払い**
4. Payment ← **moved earlier vs. 後払い**
5. Shipping ← **moved later vs. 後払い**
6. Settlement (Fiat payout to Seller)

---

# 📦 SELLER — Step-by-step (Happy Path)

> Assumption: Seller is already onboarded and Seller-side KYC/審査 is complete.

### Phase 1 — Inquiry (application creation)
1. 🟢 **[MANUAL]** Receive purchase intent from Buyer (outside TRADOM).
2. 🟢 **[MANUAL]** Open TRADOM Seller 管理画面 → **問い合わせ画面**, and create a **取引申請** with:
   - Buyer information
   - Estimated transaction amount
   - Product / transaction details
   - Transaction history (if any)
   - Optional attachments (PDF / Excel / image)
   - *(Sales contract info NOT required — unlike 後払い)*

### Phase 3 — Invoice issuance *(done early in 前払い)*
3. 🟢 **[MANUAL]** Create the invoice.
4. 🟢 **[MANUAL]** Finalize the invoice content.
5. 🟢 **[MANUAL]** Upload invoice + supporting docs to TRADOM 管理画面.
6. 🟢 **[MANUAL]** **Finalize the payment request** to TRADOM (システム上で確定操作).

### Phase 2 — Review (与信審査) *(TRADOM-side; Seller waits)*
7. ⏳ Wait for TRADOM's **事前審査** (preliminary credit review) of Buyer.
8. 📧 **[EMAIL]** Receive result:
   - **OK** → 「支払い受付」 email
   - **NG** → 「支払い却下」 email (see Edge cases)
9. 🟢 **[MANUAL]** Check 管理画面 → confirm 受付ステータス and details.

### Phase 4 — Payment monitoring
10. 📧 **[EMAIL]** Receive **「Buyer審査通過」** notification.
11. 📧 **[EMAIL]** Receive **「支払案内を送付しました」** notification (TRADOM has sent payment link to Buyer; debt assigned from Seller to TRADOM).
12. ⏳ Wait for Buyer's payment.
13. 📧 **[EMAIL]** Receive **決済完了** notification once Buyer pays.

### Phase 5 — Shipping *(only after payment confirmed)*
14. 🟢 **[MANUAL]** Ship the goods to Buyer.
15. 🟢 **[MANUAL]** Notify shipment completion.
16. ⏳ Delivery completes.

### Phase 6 — Settlement
17. ⏳ TRADOM converts crypto → fiat (off-ramp).
18. 📧 **[EMAIL]** Receive **振り込み完了** notification on the pre-agreed date.
19. ✅ Transaction with Buyer complete.

---

## ⚠️ SELLER — Edge cases

| Case | What happens | Seller action |
|---|---|---|
| **審査NG / 支払い却下** | 📧 Rejection email received | 🟢 Check 却下 status and details in 管理画面. Transaction ends here. |
| **金額不一致 — 不足入金** (Buyer underpaid) | ⚙️ TRADOM refunds Buyer; 📧 notification sent | No action required. **Buyer may re-pay** — transaction resumes. |
| **金額不一致 — 超越入金** (Buyer overpaid) | ⚙️ TRADOM issues partial refund; 📧 notification sent | No action required. |
| **Buyer requests refund after settlement** | Buyer contacts Seller directly | 🟢 Decide: **合意する** → handle via post-transaction refund flow / **合意しない** → individual communication |
| **取引キャンセル (irregular)** | Alert raised | 🟢 Coordinate individually with TRADOM admin |

---

# 🛠️ TRADOM ADMIN — Step-by-step (Happy Path)

> Operates via the TRADOM 管理者用 管理画面.

### Phase 1 — Application intake
1. 📧 **[AUTO]** Receive application email from Seller.
2. ⚙️ **[AUTO]** Alert displayed in admin 管理画面.
3. 🟢 **[MANUAL]** Open the application and review details (invoice already attached).

### Phase 2 — Review (与信審査)
4. 🟢 **[MANUAL]** Conduct **事前審査** (preliminary credit review) on Buyer (Client B).
   - *Lighter than 後払い's 厳密版, because Buyer pays before shipping.*
5. 🟢 **[MANUAL]** Record result:
   - **通過** → 🟢 Approve transaction on screen (取引の受付)
   - **却下** → 🟢 Change status to 却下 → ⚙️ rejection email auto-sent
   - **追加確認あり** → 🟢 Individual handling
6. ⚙️ **[AUTO]** **新規支払い依頼アラート** displayed in 管理画面.

### Phase 3 / 4 — Invoice & payment receipt confirmation
7. 🟢 **[MANUAL]** Check invoice content:
   - **問題なし** → 🟢 Confirm 審査通過 → 🟢 Confirm 支払い受付確定 (status change)
   - **問題あり** → 🟢 Individual inquiry handling
8. ⚙️ **[AUTO]** Status changed to 受付; **支払い受付メール** sent to Seller (連動処理).
9. ⚙️ **[AUTO]** **審査通過・支払い案内メール** auto-sent to Buyer (連動処理) containing:
   - Notice that debt has been assigned from Seller to TRADOM
   - 審査通過 ✅
   - Payment flow explanation
   - Payment link
   - Review result
   - Contract agreement info
   - Held information
10. ⚙️ **[AUTO]** 管理画面 shows **審査通過ラベル** + **支払い待ち** status.

### Phase 4 — Payment monitoring
11. ⏳ Wait for Buyer to pay via the payment screen.
12. 🟢 **[MANUAL]** Check Buyer's remittance amount (金額照合 is manual).
13. ⚙️ **[AUTO]** 照合結果 flag displayed when mismatch is detected:
    - **一致** → 🟢 admin confirms → proceed
    - **不足入金 / 超越入金** → 🟢 **MANUAL admin decision** (see Edge cases)
14. ⚙️ **[AUTO]** **決済完了メール** sent to Buyer and Seller (連動処理).

### Phase 5 — Shipping monitoring
15. 🟢 **[MANUAL]** **取引モニタリング** — monitor that Seller ships after payment.
16. ⚙️ **[AUTO]** Transaction status switches to **受け取り完了** automatically when delivery confirmed.

### Phase 6 — Settlement (Fiat payout)
17. 🟢 **[MANUAL]** Execute crypto → fiat exchange / off-ramp.
18. 🟢 **[MANUAL]** On the pre-agreed date, transfer fiat to **Client A (Seller)**.
19. ⚙️ **[AUTO]** **振り込み完了メール** auto-sent to Seller (連動処理).
20. 🟢 **[MANUAL]** Change transaction status to **完了**.

---

## ⚠️ TRADOM ADMIN — Edge cases

| Case | Trigger | Admin action |
|---|---|---|
| **審査却下** | Credit review fails | 🟢 Change status to 却下 → ⚙️ 支払い却下メール auto-sent |
| **追加確認あり** | Review needs more info | 🟢 Contact via **email or phone**; leave notes in 管理画面. Process pauses until resolved. |
| **インボイス問題あり** | Invoice content check fails | 🟢 **Process halted** — admin contacts Seller via email/phone to confirm manually; leave notes. |
| **不足入金** (Buyer underpaid) | 照合結果 flags mismatch | 🟢 Admin decides → ⚙️ 返金 auto-email sent → 🟢 execute refund per manual. **Buyer may re-pay.** |
| **超越入金** (Buyer overpaid) | 照合結果 flags mismatch | 🟢 Admin decides → ⚙️ 一部返金 auto-email sent → 🟢 execute refund per manual |
| **Buyer post-payment refund request** | Buyer contacts admin | 🟢 Coordinate between Buyer and Seller |
| **取引キャンセル (irregular)** | Any stage | 🟢 Raise alert; individual handling |

---

# Key characteristics of 前払い型 (vs. 後払い型)

- **Payment happens BEFORE shipping** → review (与信審査) is **事前審査** (lighter), because TRADOM bears no Buyer-default risk after payment is received.
- **Sales contract info NOT required** at inquiry.
- **Invoice is created and uploaded UP FRONT**, bundled with the application.
- **Debt is still assigned** from Seller to TRADOM (代物弁済契約) when payment instructions are sent to Buyer.
- **Single Seller-side work block**: application + invoice upload happen together; shipping happens later as a separate phase.
- **Single Admin-side approval gate** (credit review + invoice check happen in one window), then a **monitoring phase** during shipping.

---

*Source: 商品引渡し後履行型対象取引（インボイス前払い型／請求書ベース）*
