# 口座振替

`POST /your-endpoint-on-directdebit-payment`

- operationId: `receiveWebhookOfDirectDebitPayment`
- tags: Webhook_通知仕様

口座振替に関するイベント（`payments.directdebit.*`）で通知されるリクエストのボディの仕様です。


## リクエストボディ

Content-Type: `application/json`

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `shop_id` | Shop_properties-id |  |  |
| `order_id` | Payment_properties-id |  |  |
| `access_id` | access_id |  |  |
| `pay_type` | PayType |  | 決済種別 |
| `status` | PaymentStatus |  | 決済ステータス |
| `customer_id` | id |  |  |
| `payment_method_id` | PaymentMethod_properties-id |  |  |
| `result_code` | DirectDebitResultCode |  |  |
| `client_field_1` | client_field_n |  | 加盟店自由項目 1 |
| `client_field_2` | client_field_n |  | 加盟店自由項目 2 |
| `client_field_3` | client_field_n |  | 加盟店自由項目 3 |
| `amount` | amount |  | 利用金額 |
| `tax` | tax |  | 税送料 |
| `process_date` | Payment_properties-process_date |  |  |
| `target_date` | target_date |  | 振替指定日 |
| `withdrawal_date` | withdrawal_date |  |  |
| `request_accept_end_date` | request_accept_end_date |  |  |
| `transfer_return_date` | transfer_return_date |  |  |
| `remarks` | remarks |  | ご利用明細表示内容 |
| `subscription_id` | Subscription_properties-id |  |  |
| `error_code` | error_code |  | この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。 |
| `event` | FincodeEvent |  |  |

## レスポンス

### 200 fincodeに正常にWebhookを受信した旨をレスポンスしてください。

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `receive` | enum(0 | 1) |  | Webhook通知受信 |

### 400 4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。

