CreddotDocsCreddot Docs
API referenceSubscriptions

Update a subscription

PATCH
/api/v1/subscriptions/{subscriptionId}

Authorization

api-key
headerx-api-key<token>

Your API key: ck_test_... for test mode, ck_live_... for live. Send it with x-api-secret (or Authorization: Bearer ).

Path Parameters

subscriptionId*string

Header Parameters

x-api-secret?string

Recommended: API secret sent over HTTPS. You may send it as Authorization: Bearer instead. If supplied, x-timestamp and x-signature are not required.

x-timestamp?string

Legacy signed mode: Unix time in milliseconds; maximum clock skew five minutes.

x-signature?string

Legacy signed mode: HMAC-SHA256(secret, timestamp.METHOD.url.idempotencyKey.bodyHash).

x-idempotency-key*string

1–128 letters/digits or ._:-. Same key and payload replay for 24 hours; conflicting, in-flight, or expired keys return 409. Never change a key to retry an uncertain payment.

Request Body

application/json
  1. body
name?string
Lengthlength <= 160
planId?string

Make another plan of this subscription the default.

description?|
Lengthlength <= 5000
amountMinor?string

Changes the default plan price.

billingCycle?string

Changes the default plan cycle.

Value in"WEEKLY""MONTHLY""QUARTERLY""BIANNUALLY""ANNUALLY"
startAt?string
Formatdate-time
autoRenewal?boolean
renewalReminders?boolean
allowPlanUpgrade?boolean
gracePeriodDays?number
Range0 <= value <= 30

Response Body

Example Request
curl -X PATCH 'https://api.creddot.com/api/v1/subscriptions/string' \  -H 'x-idempotency-key: string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
Empty