Forge Docs
PaymentRefund

Refund

返金処理を担当する Sub-Feature

概要

Payment.Refund は Stripe を利用した返金の作成・取得を担当する。

API

Handler

関数説明
createRefund(input)返金を作成
retrieveRefund(input)返金を取得

Service

関数説明
createRefund(input)返金作成処理
retrieveRefund(input)返金取得処理

Schema

スキーマ説明
RefundStatusSchema"pending" | "succeeded" | "failed" | "canceled"返金ステータス
RefundSchemaRefund返金
CreateRefundInputSchemaCreateRefundInput作成入力
RetrieveRefundInputSchemaRetrieveRefundInput取得入力

使用例

import { Payment } from "@unitto/features";

const refund = await Payment.Refund.Handler.createRefund({
  paymentIntentId: "pi_xxx",
  amount: 500,
  reason: "customer_request",
});

On this page