Skip to main content
POST
/
api
/
v1
/
subscriptions
/
{id}
/
adjust
Adjust Subscription
curl --request POST \
  --url https://app.flowglad.com/api/v1/subscriptions/{id}/adjust \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "adjustment": {
    "timing": "<string>",
    "newSubscriptionItems": [
      {
        "subscriptionId": "<string>",
        "addedDate": 0,
        "unitPrice": 4503599627370495,
        "quantity": 4503599627370495,
        "type": "<string>",
        "name": "<string>",
        "priceId": "<string>",
        "metadata": {},
        "externalId": "<string>",
        "expiredAt": 0,
        "manuallyCreated": true
      }
    ],
    "prorateCurrentBillingPeriod": true
  }
}
'
{
  "subscription": {
    "id": "<string>",
    "createdAt": 0,
    "updatedAt": 0,
    "livemode": true,
    "startDate": 0,
    "customerId": "<string>",
    "organizationId": "<string>",
    "status": "trialing",
    "defaultPaymentMethodId": "<string>",
    "backupPaymentMethodId": "<string>",
    "cancellationReason": "<string>",
    "replacedBySubscriptionId": "<string>",
    "isFreePlan": true,
    "doNotCharge": true,
    "priceId": "<string>",
    "runBillingAtPeriodStart": true,
    "interval": "day",
    "intervalCount": 123,
    "name": "<string>",
    "renews": true,
    "pricingModelId": "<string>",
    "current": true,
    "trialEnd": 0,
    "currentBillingPeriodStart": 0,
    "currentBillingPeriodEnd": 0,
    "metadata": {},
    "canceledAt": 0,
    "cancelScheduledAt": 0,
    "billingCycleAnchorDate": 0,
    "scheduledAdjustmentAt": 0
  },
  "subscriptionItems": [
    {
      "id": "<string>",
      "createdAt": 0,
      "updatedAt": 0,
      "livemode": true,
      "subscriptionId": "<string>",
      "name": "<string>",
      "addedDate": 0,
      "priceId": "<string>",
      "unitPrice": 4503599627370495,
      "quantity": 4503599627370495,
      "type": "<string>",
      "externalId": "<string>",
      "manuallyCreated": true,
      "pricingModelId": "<string>",
      "metadata": {},
      "expiredAt": 0
    }
  ],
  "resolvedTiming": "immediately",
  "isUpgrade": true
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

Body

application/json
adjustment
object
required

Response

Successful response

subscription
object
required
subscriptionItems
object[]
required
resolvedTiming
enum<string>
required

The actual timing applied. When 'auto' timing is requested, this indicates whether the adjustment was applied immediately (for upgrades) or at the end of the billing period (for downgrades).

Available options:
immediately,
at_end_of_current_billing_period
isUpgrade
boolean
required

Whether this adjustment is an upgrade (true) or downgrade/lateral move (false). An upgrade means the new plan total is greater than the old plan total.