Appearance
課金
イベント一覧
| イベント | リソース | 説明 |
|---|---|---|
billing.create_subscription | billing | サブスクリプションが作成された。 |
billing.update_subscription | billing | サブスクリプションが更新された。 |
billing.cancel_subscription | billing | サブスクリプションが解約された。 |
billing.update_plan_for_free | billing | 無料プランのまま、プランまたは課金サイクルが変更された。 |
billing.update_plan_for_trial | billing | トライアルプランのまま、プランまたは課金サイクルが変更された。 |
billing.create_portal_session | billing | 支払い情報を管理するカスタマーポータルのセッションが作成された。 |
billing.preview_update | billing | プラン変更内容のプレビューが取得された。 |
イベント詳細
billing.create_subscription 準備中
サブスクリプションが作成された。
| フィールド | 値 |
|---|---|
event.code | billing.create_subscription |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | plan, billing_cycle |
grant | (なし) |
extra | (なし) |
change
| 名前 | モード | 型 | 必須 | 説明 |
|---|---|---|---|---|
plan | 値 | string | 必須 | — |
billing_cycle | 値 | string | 必須 | — |
サンプル
json
{
"event": {
"code": "billing.create_subscription",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"change": {
"fields": [
{
"name": "plan",
"new": "business"
},
{
"name": "billing_cycle",
"new": "monthly"
}
]
},
...
}billing.update_subscription 準備中
サブスクリプションが更新された。
| フィールド | 値 |
|---|---|
event.code | billing.update_subscription |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | plan, billing_cycle |
grant | (なし) |
extra | (なし) |
change
| 名前 | モード | 型 | 必須 | 説明 |
|---|---|---|---|---|
plan | 値 | string | 必須 | — |
billing_cycle | 値 | string | 必須 | — |
サンプル
json
{
"event": {
"code": "billing.update_subscription",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"change": {
"fields": [
{
"name": "plan",
"old": "starter",
"new": "business"
},
{
"name": "billing_cycle",
"old": "monthly",
"new": "yearly"
}
]
},
...
}billing.cancel_subscription 準備中
サブスクリプションが解約された。
| フィールド | 値 |
|---|---|
event.code | billing.cancel_subscription |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | plan, billing_cycle |
grant | (なし) |
extra | (なし) |
change
| 名前 | モード | 型 | 必須 | 説明 |
|---|---|---|---|---|
plan | 値 | string | 必須 | — |
billing_cycle | 値 | string | 必須 | — |
サンプル
json
{
"event": {
"code": "billing.cancel_subscription",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"change": {
"fields": [
{
"name": "plan",
"old": "business"
},
{
"name": "billing_cycle",
"old": "monthly"
}
]
},
...
}billing.update_plan_for_free 準備中
無料プランのまま、プランまたは課金サイクルが変更された。
| フィールド | 値 |
|---|---|
event.code | billing.update_plan_for_free |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | plan, billing_cycle |
grant | (なし) |
extra | (なし) |
change
| 名前 | モード | 型 | 必須 | 説明 |
|---|---|---|---|---|
plan | 値 | string | 必須 | — |
billing_cycle | 値 | string | 必須 | — |
サンプル
json
{
"event": {
"code": "billing.update_plan_for_free",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"change": {
"fields": [
{
"name": "plan",
"old": "starter",
"new": "business"
},
{
"name": "billing_cycle",
"old": "monthly",
"new": "yearly"
}
]
},
...
}billing.update_plan_for_trial 準備中
トライアルプランのまま、プランまたは課金サイクルが変更された。
| フィールド | 値 |
|---|---|
event.code | billing.update_plan_for_trial |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | plan, billing_cycle |
grant | (なし) |
extra | (なし) |
change
| 名前 | モード | 型 | 必須 | 説明 |
|---|---|---|---|---|
plan | 値 | string | 必須 | — |
billing_cycle | 値 | string | 必須 | — |
サンプル
json
{
"event": {
"code": "billing.update_plan_for_trial",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"change": {
"fields": [
{
"name": "plan",
"old": "starter",
"new": "business"
},
{
"name": "billing_cycle",
"old": "monthly",
"new": "yearly"
}
]
},
...
}billing.create_portal_session 準備中
支払い情報を管理するカスタマーポータルのセッションが作成された。
| フィールド | 値 |
|---|---|
event.code | billing.create_portal_session |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | (なし) |
grant | (なし) |
extra | flow_type, return_url |
extra
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
flow_type | string | 必須 | カスタマーポータルで開くフローの種類 |
return_url | string | 必須 | カスタマーポータルから戻る先の URL sensitivity: pii |
サンプル
json
{
"event": {
"code": "billing.create_portal_session",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"extra": {
"flow_type": "subscription_update",
"return_url": "https://app.example.com/settings"
},
...
}billing.preview_update 準備中
プラン変更内容のプレビューが取得された。
| フィールド | 値 |
|---|---|
event.code | billing.preview_update |
scope.type | workspace |
resource.type | billing |
references | (なし) |
query | (なし) |
change | (なし) |
grant | (なし) |
extra | plan, billing_cycle |
extra
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
plan | string | 必須 | プレビュー対象のプラン。実際の契約は変更されません。 |
billing_cycle | string | 必須 | プレビュー対象の課金サイクル。実際の契約は変更されません。 |
サンプル
json
{
"event": {
"code": "billing.preview_update",
...
},
"scope": {
"type": "workspace",
...
},
"resource": {
"type": "billing",
"uid": null,
"name": null,
"path": "billing",
"parts": [
{
"type": "billing",
"uid": null,
"name": null
}
],
...
},
"extra": {
"plan": "business",
"billing_cycle": "monthly"
},
...
}