Skip to main content
POST
/
api
/
v1
/
subscriptions
/
{id}
/
adjust
Adjust a Subscription. Note: Immediate adjustments are in private preview. Adjustments at the end of the current billing period are generally available.
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>",
        "name": "<string>",
        "addedDate": 0,
        "priceId": "<string>",
        "unitPrice": 4503599627370495,
        "quantity": 4503599627370495,
        "usageEventsPerUnit": null,
        "usageMeterId": null,
        "metadata": {},
        "type": "<string>",
        "externalId": "<string>",
        "expiredAt": 0
      }
    ],
    "prorateCurrentBillingPeriod": true
  }
}'
{
  "subscription": {
    "id": "<string>",
    "createdAt": 0,
    "updatedAt": 0,
    "livemode": true,
    "startDate": 0,
    "customerId": "<string>",
    "organizationId": "<string>",
    "status": "trialing",
    "defaultPaymentMethodId": "<string>",
    "backupPaymentMethodId": "<string>",
    "trialEnd": 0,
    "currentBillingPeriodStart": 0,
    "currentBillingPeriodEnd": 0,
    "metadata": {},
    "canceledAt": 0,
    "cancelScheduledAt": 0,
    "cancellationReason": "<string>",
    "replacedBySubscriptionId": "<string>",
    "isFreePlan": true,
    "priceId": "<string>",
    "runBillingAtPeriodStart": true,
    "interval": "day",
    "intervalCount": 123,
    "billingCycleAnchorDate": 0,
    "name": "<string>",
    "renews": true,
    "current": true
  },
  "subscriptionItems": [
    {
      "id": "<string>",
      "createdAt": 0,
      "updatedAt": 0,
      "livemode": true,
      "subscriptionId": "<string>",
      "name": "<string>",
      "addedDate": 0,
      "priceId": "<string>",
      "unitPrice": 4503599627370495,
      "quantity": 123,
      "usageEventsPerUnit": null,
      "usageMeterId": null,
      "metadata": {},
      "type": "<string>",
      "externalId": "<string>",
      "expiredAt": 0
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

Body

application/json
adjustment
object
required
  • Option 1
  • Option 2

Response

Successful response

subscription
object
required
  • Option 1
  • Option 2
subscriptionItems
object[]
required
I