返金を作成する


新しい返金を作成する場合、返金を作成する支払いオブジェクトを指定する必要があります。

新しい返金を作成すると、以前作成され、まだ全額返金されていない支払いの返金が行われます。返金は、その支払いが請求されたお客様に対して行われます。

また、請求額の一部のみを返金することも可能です。全額が返金されるまで、複数回に分けて返金することができます。全額が返金された支払いに対して、再度返金を行うことはできません。返金済みの支払いに対して呼び出しを行したり、残金以上の金額を返金しようとすると、エラーが返されます。返金は最終決定であり、取り消すことはできません。

エラー

すべての API エンドポイントに当てはまる エラー に加え、以下は返金の作成時にのみ返されるエラーです。

ステータスコード エラーコード 説明
404 payment.not-found 条件に合う支払いが見つかりませんでした。正しい paymentId と API キーを使用してください。テストモードのオブジェクトには、テストキーを使用してのみアクセスすることができ、ライブモードのオブジェクトには、ライブキーを使用してのみアクセスできます。
403 amount.insufficient 支払いに利用できる残高が不足しているため、リクエストを処理できません。
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Create Refund

number
≥ 0

A positive amount representing how much of this payment to refund. You can refund only up to the remaining, unrefunded amount of the payment. If this is not set, the default will be the full unrefunded amount of the payment.

string
required

Three-letter ISO currency code, in uppercase. Must be a supported currency.

string
length between 1 and 80

An arbitrary - ideally descriptive - long form explanation of the Refund, meant to be displayed to the customer.

lineItems
array of objects

A list of the IDs of the Line Items of the original Payment this Refund is on.

lineItems
metadata
object

Set of up to 20 key-value pairs that you can attach to the object.

string
required

The unique identifier for the Payment object.

string
enum
required

The reason of the Refund

Allowed:
string
length between 1 and 40

A - ideally unique - string to reference the Refund which can be used to reconcile the Refund with your internal systems.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json