Skip to main content
POST
/
stripe
/
connect
/
accounts
/
{accountId}
/
subscriptions
Create Subscription
curl --request POST \
  --url https://api.chat-dash.com/v1/public/stripe/connect/accounts/{accountId}/subscriptions \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "clientId": "64abc123def456789012345a",
    "agentIds": [
      "64abc123def456789012345b"
    ],
    "selectedProduct": {
      "productId": "prod_ABC123XYZ",
      "startDate": 1700000000,
      "pricing": {
        "metrics": "minutes"
      }
    },
    "couponId": "",
    "taxSettings": {
      "enabled": false
    }
  }
}
'
{
  "id": "sub_sched_1ABC123DEF456GHI",
  "type": "schedule",
  "status": "not_started",
  "customer": {
    "id": "cus_ABC123XYZ",
    "email": "[email protected]"
  },
  "current_period_start": 1700000000,
  "current_period_end": 1702600000,
  "startDate": 1700000000,
  "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": "",
  "priceIds": [
    "price_ABC123",
    "price_DEF456"
  ],
  "agents": "Agent 1",
  "cancelAtPeriodEndDisplay": null
}

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

Body

application/json
data
object
required

Response

OK

id
string

The subscription schedule ID

Example:

"sub_sched_1ABC123DEF456GHI"

type
string
Example:

"schedule"

status
string
Example:

"not_started"

customer
object
current_period_start
integer | null
Example:

1700000000

current_period_end
integer | null
Example:

1702600000

startDate
integer | null
Example:

1700000000

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:

""

priceIds
string[]
Example:
["price_ABC123", "price_DEF456"]
agents
string
Example:

"Agent 1"

cancelAtPeriodEndDisplay
string | null
Example:

null