PaymentRefund
Refund
返金処理を担当する Sub-Feature
概要
Payment.Refund は Stripe を利用した返金の作成・取得を担当する。
API
Handler
| 関数 | 説明 |
|---|---|
createRefund(input) | 返金を作成 |
retrieveRefund(input) | 返金を取得 |
Service
| 関数 | 説明 |
|---|---|
createRefund(input) | 返金作成処理 |
retrieveRefund(input) | 返金取得処理 |
Schema
| スキーマ | 型 | 説明 |
|---|---|---|
RefundStatusSchema | "pending" | "succeeded" | "failed" | "canceled" | 返金ステータス |
RefundSchema | Refund | 返金 |
CreateRefundInputSchema | CreateRefundInput | 作成入力 |
RetrieveRefundInputSchema | RetrieveRefundInput | 取得入力 |
使用例
import { Payment } from "@unitto/features";
const refund = await Payment.Refund.Handler.createRefund({
paymentIntentId: "pi_xxx",
amount: 500,
reason: "customer_request",
});