# サブスクリプション（カード決済）

`POST /your-endpoint-on-card-subscription`

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

カード決済によるサブスクリプションに関するイベント（`subscription.card.*`）で通知されるリクエストのボディの仕様です。


## リクエストボディ

Content-Type: `application/json`

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `shop_id` | Shop_properties-id |  |  |
| `subscription_id` | Subscription_properties-id |  |  |
| `plan_id` | Plan_properties-id |  |  |
| `customer_id` | id |  |  |
| `card_id` | properties-id |  |  |
| `default_card_flag` | default_flag |  |  |
| `status` | SubscriptionStatus |  |  |
| `client_field_1` | client_field_n |  | 加盟店自由項目 1 |
| `client_field_2` | client_field_n |  | 加盟店自由項目 2 |
| `client_field_3` | client_field_n |  | 加盟店自由項目 3 |
| `process_date` | Payment_properties-process_date |  |  |
| `start_date` | start_date |  |  |
| `stop_date` | stop_date |  |  |
| `next_charge_date` | next_charge_date |  |  |
| `end_month_flag` | end_month_flag |  |  |
| `pay_type` | SubscriptionPayType |  |  |
| `event` | FincodeEvent |  |  |

## レスポンス

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

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

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

