Skip to main content
PUT
/
users
/
change-billing-plan
Changes billing plan.
curl --request PUT \
  --url https://api.leadping.ai/users/change-billing-plan \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "billingPlan": "Annual",
  "userId": "<string>"
}'
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "modifiedAt": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "email": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "phone": "<string>",
  "billingPlan": "Annual",
  "subscriptionStatus": "Pending",
  "roles": [
    "Initialized"
  ],
  "identities": [
    {
      "issuer": "<string>",
      "issuerAssignedId": "<string>",
      "signInType": "<string>"
    }
  ],
  "stripeInfo": {
    "customerId": "<string>",
    "defaultPaymentMethodId": "<string>",
    "subscriptionIds": [
      "<string>"
    ],
    "cancelAt": "2023-11-07T05:31:56Z"
  },
  "accountBalance": 123,
  "autoRefillEnabled": true,
  "autoRefillAmount": 123,
  "autoRefillTrigger": 123,
  "business": {
    "id": "<string>",
    "name": "<string>"
  },
  "compliance": {
    "acceptedTerms": true,
    "acceptedToSubscription": true,
    "acceptedSms": true,
    "acceptedBaa": true,
    "acceptedEmail": true,
    "trustedFormCertificates": [
      {
        "id": "<string>",
        "url": "<string>",
        "source": "<string>",
        "createdAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. (i.e. "Bearer 1234abcdef")

Body

application/json
billingPlan
enum<string>
Available options:
Annual,
Monthly
userId
string | null

Response

OK

id
string | null
createdAt
string<date-time>
modifiedAt
string<date-time> | null
name
string | null
email
string | null
firstName
string | null
lastName
string | null
phone
string | null
billingPlan
enum<string>
Available options:
Annual,
Monthly
subscriptionStatus
enum<string>
Available options:
Pending,
Active,
Overdue,
Canceled
roles
enum<string>[] | null
identities
object[] | null
stripeInfo
object
accountBalance
number
autoRefillEnabled
boolean
autoRefillAmount
number | null
autoRefillTrigger
number | null
business
object
compliance
object
I