コンテンツにスキップ

イベント参加者の入金・返金を記録する

POST
/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/payments
curl --request POST \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/occurrences/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/participants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "EXPECTED_CHARGE", "amount_yen": 1, "booking_item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "method": "example", "occurred_at": "2026-04-15", "note": "example" }'

URL⁠で指定した1予約へ正の整数円を記録する。booking_item_id⁠は同じ予約の明細だけを指定できる。RECEIVED/REFUNDED⁠はpaid_yen⁠を増減し、EXPECTED_CHARGE/EXPECTED_REFUND⁠は予定額へ反映する。method⁠は前後の空白を除いて60文字以内、occurred_at⁠はYYYY-MM-DD。

customer⁠はid⁠とname⁠だけ、contact⁠はemail⁠とphone⁠で、customers:contact⁠の許可がなければcontact全体がnull、許可があっても未登録の欄はnull⁠です。

アーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUND⁠で、書き込みも通知もしません。

個別コードのない業務入力エラーは422 BOOKING_INPUT_INVALID⁠で、理由は日本語のmessage⁠に入ります。

必要な範囲: events:write

customers:contact があるとメール・電話が入る(会話はメールのみ)。

id
必須
string 形式: uuid
occId
必須
string 形式: uuid
bookingId
必須
string 形式: uuid

ヘッダーのパラメータ

「ヘッダーのパラメータ」の節へ
Idempotency-Key
string

同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSED⁠です。

メディアタイプapplication/json
object
kind
必須
string
取りうる値: EXPECTED_CHARGE EXPECTED_REFUND RECEIVED REFUNDED
amount_yen
必須
integer
>= 1 <= 2147483647
booking_item_id
string | null 形式: uuid
method
string | null
60文字以下
occurred_at
string | null 形式: date
note
string | null

イベント参加者の入金・返金を記録する

メディアタイプapplication/json
object
data
必須
object
booking_id
必須
string 形式: uuid
status
必須
string
取りうる値: PENDING AWAITING_APPROVAL APPROVED_PENDING_NOTICE CONFIRMED COMPLETED CANCELLED WITHDRAWN DECLINED EXPIRED
attendance
必須
string
取りうる値: UNSET ATTENDED NO_SHOW
customer
必須
object
id
必須
string 形式: uuid
name
必須
string
contact
必須
object
email
必須
string | null
phone
必須
string | null
items
必須
Array<object>
object
id
必須
string 形式: uuid
status
必須
string
取りうる値: HELD CONFIRMED WAITLISTED OFFERED CANCELLED
live
必須
boolean
menu_name
必須
string
starts_at
必須
string 形式: date-time
provider
必須
object
id
必須
string 形式: uuid
name
必須
string | null
price_yen
必須
integer
due_yen
必須

生きた明細ぶんの合計金額。既存の変更・取消し台帳を反映し、取消済み履歴のprice_yen⁠を単純加算しない。

integer
paid_yen
必須
integer
created_at
必須
string 形式: date-time
例
{
"data": {
"status": "PENDING",
"attendance": "UNSET",
"items": [
{
"status": "HELD"
}
]
}
}

利用できないヘッダ

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

鍵が無い・無効

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

範囲不足

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

見つからない

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

予約・冪等キーの競合

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

本文が1 MiB⁠を超えている

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

入力の検証失敗

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

回数の上限

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}
RateLimit-Limit
integer
>= 1

固定窓内の回数上限

RateLimit-Remaining
integer

固定窓内の残り回数

RateLimit-Reset
integer

窓終了までの秒数

Retry-After
integer
>= 1

再試行までの待機秒数

内部エラー

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}