Skip to main content
POST
/
customers
/
{customer_id}
/
plans
/
{customer_plan_id}
/
end
End a customer plan
curl --request POST \
  --url https://api.metronome.com/v1/customers/{customer_id}/plans/{customer_plan_id}/end \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ending_before": "2021-02-01T00:00:00Z"
}'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customer_id
string<uuid>
required
customer_plan_id
string<uuid>
required

the ID of a customer-plan relationship

Body

application/json

The date at which this customer's plan should end

ending_before
string<date-time>

RFC 3339 timestamp for when the plan ends (exclusive) for this customer. Must be at 0:00 UTC (midnight). If not provided, the plan end date will be cleared.

void_invoices
boolean

If true, plan end date can be before the last finalized invoice date. Any invoices generated after the plan end date will be voided.

void_stripe_invoices
boolean

Only applicable when void_invoices is set to true. If true, for every invoice that is voided we will also attempt to void/delete the stripe invoice (if any). Stripe invoices will be voided if finalized or deleted if still in draft state.

Response

200 - application/json

Success

The response is of type object.

I