LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request PUT "$LAGO_URL/api/v1/subscriptions/{external_id}" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"subscription": {
"name": "",
"subscription_at": "2022-08-08T00:00:00Z",
"ending_at": "2023-08-08T00:00:00Z",
"plan_overrides": {
"name": "new_plan",
"invoice_display_name": "Subscription fee",
"description": "Overriden plan for customer X",
"charges": [
{
"id": "cac4cff7-e2d9-41e2-83e5-7947d91f0eb5",
"invoice_display_name": "Cards - custom price",
"properties": {
"amount": "10"
},
"group_properties": [],
}
]
}
}
}'