# 決済手段

`POST /your-endpoint-on-customer-payment_method`

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

顧客の決済手段に関するイベント（`customers.payment_methods.*`）で通知されるリクエストのボディの仕様です。


## リクエストボディ

Content-Type: `application/json`

#### カード

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `shop_id` | Shop_properties-id |  |  |
| `order_id` | Payment_properties-id |  |  |
| `card_status` | PaymentMethodStatus |  |  |
| `customer_group_id` | customer_group_id |  |  |
| `customer_id` | id |  |  |
| `card_id` | properties-id |  |  |
| `process_date` | Payment_properties-process_date |  |  |
| `process_type` | enum(I | U) |  | 処理タイプ |
| `card_no_display` | properties-card_no |  |  |
| `expire_display` | properties-expire |  |  |
| `forward` | forward |  |  |
| `default_flag` | default_flag |  |  |
| `status` | enum(AUTHENTICATED | CHECK) |  | 3Dセキュア2.0認証処理 ステータス |
| `access_id` | access_id |  |  |
| `transaction_id` | transaction_id |  |  |
| `approve` | approve |  |  |
| `client_field_1` | client_field_n |  | 加盟店自由項目 1 |
| `client_field_2` | client_field_n |  | 加盟店自由項目 2 |
| `client_field_3` | client_field_n |  | 加盟店自由項目 3 |
| `error_code` | error_code |  |  |
| `pay_type` | enum(Card) |  | 決済種別 |
| `event` | FincodeEvent |  |  |

#### 口座振替

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `shop_id` | Shop_properties-id |  |  |
| `customer_id` | id |  |  |
| `payment_method_id` | PaymentMethod_properties-id |  |  |
| `process_date` | Payment_properties-process_date |  |  |
| `status` | PaymentMethodStatus |  |  |
| `client_field_1` | client_field_n |  | 加盟店自由項目 1 |
| `client_field_2` | client_field_n |  | 加盟店自由項目 2 |
| `client_field_3` | client_field_n |  | 加盟店自由項目 3 |
| `pay_type` | enum(Directdebit) |  | 決済種別 |
| `directdebit` | WebhookPaymentMethodDirectdebit |  | 口座振替 決済手段登録情報 |
| `event` | FincodeEvent |  |  |

#### 銀行振込（バーチャル口座）

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `shop_id` | Shop_properties-id |  |  |
| `id` | PaymentMethod_properties-id |  | 決済手段ID |
| `pay_type` | enum(Virtualaccount) |  | 決済種別 |
| `customer_id` | id |  |  |
| `process_date` | Payment_properties-process_date |  |  |
| `status` | PaymentMethodStatus |  |  |
| `default_flag` | properties-default_flag |  |  |
| `delete_flag` | delete_flag |  |  |
| `client_field_1` | client_field_n |  | 加盟店自由項目 1 |
| `client_field_2` | client_field_n |  | 加盟店自由項目 2 |
| `client_field_3` | client_field_n |  | 加盟店自由項目 3 |
| `created` | created |  |  |
| `updated` | updated |  |  |
| `virtual_account` | WebhookPaymentMethodVirtualaccount |  | 銀行振込（バーチャル口座） 決済手段登録情報 |
| `event` | FincodeEvent |  |  |

## レスポンス

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

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

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

