Skip to main content
PUT
/
subscriptions
/
{id}
更新訂閱
curl --request PUT \
  --url https://api.zangsho.com/v1/subscriptions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "plan_name": "<string>",
  "mrr": "<string>",
  "current_period_start": "2023-11-07T05:31:56Z"
}
'
{
  "data": {
    "id": 123,
    "customer_id": 123,
    "plan_name": "<string>",
    "mrr": "<string>",
    "billing_cycle": "<string>",
    "started_at": "2023-11-07T05:31:56Z",
    "current_period_start": "2023-11-07T05:31:56Z",
    "cancelled_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.zangsho.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

使用 Laravel Sanctum Token 進行認證。

Token 可在商家後台的「API 設定」頁面取得。

Path Parameters

id
integer
required

Body

application/json
plan_name
string
mrr
string
billing_cycle
enum<string>
Available options:
monthly,
quarterly,
semi-annual,
yearly
current_period_start
string<date-time>

Response

訂閱更新成功

data
object