Subscriptions
Adjust a Subscription
POST
/
api
/
v1
/
subscriptions
/
{id}
/
adjust
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": "immediately",
"newSubscriptionItems": [
{
"name": "<string>",
"addedDate": "2023-11-07T05:31:56Z",
"unitPrice": 123,
"quantity": 123,
"metadata": {},
"externalId": "<string>"
}
],
"prorateCurrentBillingPeriod": true
}
}'
{
"subscription": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByCommit": "<string>",
"updatedByCommit": "<string>",
"livemode": true,
"startDate": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"organizationId": "<string>",
"status": "trialing",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "2023-11-07T05:31:56Z",
"currentBillingPeriodStart": "2023-11-07T05:31:56Z",
"currentBillingPeriodEnd": "2023-11-07T05:31:56Z",
"metadata": {},
"canceledAt": "2023-11-07T05:31:56Z",
"cancelScheduledAt": "2023-11-07T05:31:56Z",
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "day",
"intervalCount": 123,
"billingCycleAnchorDate": "2023-11-07T05:31:56Z",
"name": "<string>",
"current": true
},
"subscriptionItems": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByCommit": "<string>",
"updatedByCommit": "<string>",
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": "2023-11-07T05:31:56Z",
"priceId": "<string>",
"unitPrice": 123,
"quantity": 123,
"metadata": {},
"externalId": "<string>"
}
]
}
Authorizations
Path Parameters
Body
application/json
Response
200
application/json
Successful response
The response is of type object
.
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": "immediately",
"newSubscriptionItems": [
{
"name": "<string>",
"addedDate": "2023-11-07T05:31:56Z",
"unitPrice": 123,
"quantity": 123,
"metadata": {},
"externalId": "<string>"
}
],
"prorateCurrentBillingPeriod": true
}
}'
{
"subscription": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByCommit": "<string>",
"updatedByCommit": "<string>",
"livemode": true,
"startDate": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"organizationId": "<string>",
"status": "trialing",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "2023-11-07T05:31:56Z",
"currentBillingPeriodStart": "2023-11-07T05:31:56Z",
"currentBillingPeriodEnd": "2023-11-07T05:31:56Z",
"metadata": {},
"canceledAt": "2023-11-07T05:31:56Z",
"cancelScheduledAt": "2023-11-07T05:31:56Z",
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "day",
"intervalCount": 123,
"billingCycleAnchorDate": "2023-11-07T05:31:56Z",
"name": "<string>",
"current": true
},
"subscriptionItems": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByCommit": "<string>",
"updatedByCommit": "<string>",
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": "2023-11-07T05:31:56Z",
"priceId": "<string>",
"unitPrice": 123,
"quantity": 123,
"metadata": {},
"externalId": "<string>"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.