Skip to main content
PUT
/
stripe
/
connect
/
accounts
/
{accountId}
/
subscriptions
/
{subscriptionId}
Update Subscription
curl --request PUT \
  --url https://api.chat-dash.com/v1/public/stripe/connect/accounts/{accountId}/subscriptions/{subscriptionId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "productId": "<string>",
    "startDate": 123,
    "taxSettings": {
      "enabled": true,
      "country": "US",
      "postalCode": "94102"
    },
    "cancelAtPeriodEnd": true
  }
}
'
{
  "id": "sub_1ABC123DEF456GHI",
  "type": "subscription",
  "status": "active",
  "cancelAtPeriodEndDisplay": null,
  "customer": {
    "id": "cus_ABC123XYZ",
    "email": "[email protected]"
  },
  "current_period_start": 1700000000,
  "current_period_end": 1702600000,
  "created": 1700000000,
  "collection_method": "charge_automatically",
  "cancel_at_period_end": false,
  "canceled_at": null,
  "product": {
    "id": "prod_ABC123XYZ",
    "name": "Pro Plan"
  },
  "automatic_tax": false,
  "coupon": "",
  "agents": "Agent 1, Agent 2",
  "priceIds": [
    "price_ABC123",
    "price_DEF456"
  ],
  "startDate": 1700000000
}

Headers

Authorization
string
required

All requests to the ChatDash API must be validated with the agency API Key found on your agency profile

Path Parameters

accountId
string
required

The Stripe connected account ID

subscriptionId
string
required

The Stripe subscription ID

Body

application/json
data
object

Response

OK

id
string
Example:

"sub_1ABC123DEF456GHI"

type
string
Example:

"subscription"

status
string
Example:

"active"

cancelAtPeriodEndDisplay
string | null
Example:

null

customer
object
Example:
{
"id": "cus_ABC123XYZ",
"email": "[email protected]"
}
current_period_start
integer | null
Example:

1700000000

current_period_end
integer | null
Example:

1702600000

created
integer
Example:

1700000000

collection_method
string
Example:

"charge_automatically"

cancel_at_period_end
boolean
Example:

false

canceled_at
integer | null
Example:

null

product
object
automatic_tax
boolean
Example:

false

coupon
string
Example:

""

agents
string
Example:

"Agent 1, Agent 2"

priceIds
string[]
Example:
["price_ABC123", "price_DEF456"]
startDate
integer | null
Example:

1700000000