Skip to main content
POST
/
v1
/
subscriptions
/
{id}
Update a Subscription
curl --request POST \
  --url https://api.leanrails.com/v1/subscriptions/{id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "metadata": {},
  "default_payment_method": "<string>"
}
'
{
  "id": "<string>",
  "object": "subscription",
  "status": "incomplete",
  "customer": "<string>",
  "livemode": true,
  "created": 123,
  "currency": "<string>",
  "default_payment_method": "<string>",
  "collection_method": "charge_automatically",
  "latest_invoice": "<string>",
  "current_period_start": 123,
  "current_period_end": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.fluveo.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent requests.

Maximum string length: 255
X-API-Version
string

Override the API version for this request.

Path Parameters

id
string
required

Subscription ID

Body

application/json
metadata
object
default_payment_method
string

Response

Success

id
string
required
object
enum<string>
required
Available options:
subscription
status
enum<string>
required
Available options:
incomplete,
trialing,
active,
past_due,
canceled,
unpaid,
paused
customer
string
required
livemode
boolean
created
integer
currency
string
default_payment_method
string | null
collection_method
enum<string>
Available options:
charge_automatically,
send_invoice
latest_invoice
string | null
current_period_start
integer
current_period_end
integer