WoyraDocs
Get an API key

Stop the email plan renewing

POST/v1/billing/email_subscription/cancel

Billing · Requires an API key

The month already paid for runs to its end and is not refunded; nothing renews after it. A plan past due ends at once.

Example

curl -X POST https://api.woyra.io/v1/billing/email_subscription/cancel \
  -H "Authorization: Bearer $WOYRA_KEY"

Response

200 The plan as it now stands.

FieldTypeDescription
objectrequired"email_subscription"
statusrequiredstringpast_due: the renewal could not be paid. The account sends on the free emails until the balance can pay it, and it renews within the hour of a top-up.
One of active, past_due, cancelled.
planrequiredEmailPlan
currencyrequiredstring
next_planEmailPlanA smaller plan chosen for the next billing month.
overagerequiredboolean
cancel_at_period_endrequiredbooleanCancelled; the plan runs to current_period_end and does not renew.
current_period_startrequiredtimestamp
current_period_endrequiredtimestampWhen the plan renews and its emails reset.
started_atrequiredtimestamp
cancelled_attimestamp

Errors

StatusCodes
401authentication_required, invalid_api_key
404not_found, product_not_offered

Also in Billing