Pular para o conteúdo principal
PUT
/
subscription
Update a subscription
curl --request PUT \
  --url https://api.cliquepay.app/subscription \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "productId": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "clientId": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "period": "MONTHLY",
  "price": 29.99,
  "trialDays": 14,
  "status": "ACTIVE",
  "expiresAt": "2025-12-31T23:59:59Z",
  "trialEndsAt": "2023-01-15T23:59:59Z",
  "nextBillingAt": "2023-02-15T23:59:59Z",
  "cancelledAt": "2023-12-31T23:59:59Z"
}'
{
  "id": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "productId": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "clientId": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "period": "MONTHLY",
  "price": 29.99,
  "trialDays": 14,
  "status": "ACTIVE",
  "expiresAt": "2025-12-31T23:59:59Z",
  "trialEndsAt": "2023-01-15T23:59:59Z",
  "nextBillingAt": "2023-02-15T23:59:59Z",
  "cancelledAt": "2023-12-31T23:59:59Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Body

application/json
id
string
Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

productId
string
Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

clientId
string
Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

period
enum<string>
Available options:
DAILY,
WEEKLY,
BIWEEKLY,
MONTHLY,
BIMONTHLY,
QUARTERLY,
SEMIANNUAL,
ANNUAL,
BIENNIAL
Example:

"MONTHLY"

price
number
Example:

29.99

trialDays
number
Example:

14

status
enum<string>
Available options:
PENDING,
ACTIVE,
TRIALING,
SUSPENDED,
CANCELLED,
EXPIRED,
PAST_DUE
Example:

"ACTIVE"

expiresAt
string<date-time>
Example:

"2025-12-31T23:59:59Z"

trialEndsAt
string<date-time>
Example:

"2023-01-15T23:59:59Z"

nextBillingAt
string<date-time>
Example:

"2023-02-15T23:59:59Z"

cancelledAt
string<date-time>
Example:

"2023-12-31T23:59:59Z"

Response

200 - application/json

Subscription updated

id
string
required
Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

productId
string
required
Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

clientId
string
required
Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

period
enum<string>
required
Available options:
DAILY,
WEEKLY,
BIWEEKLY,
MONTHLY,
BIMONTHLY,
QUARTERLY,
SEMIANNUAL,
ANNUAL,
BIENNIAL
Example:

"MONTHLY"

price
number
required
Example:

29.99

trialDays
number
required
Example:

14

status
enum<string>
required
Available options:
PENDING,
ACTIVE,
TRIALING,
SUSPENDED,
CANCELLED,
EXPIRED,
PAST_DUE
Example:

"ACTIVE"

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
expiresAt
string<date-time>
Example:

"2025-12-31T23:59:59Z"

trialEndsAt
string<date-time>
Example:

"2023-01-15T23:59:59Z"

nextBillingAt
string<date-time>
Example:

"2023-02-15T23:59:59Z"

cancelledAt
string<date-time>
Example:

"2023-12-31T23:59:59Z"

I