Skip to main content
POST
/
v1
/
account_collection_subscriptions
/
{id}
/
cancel
Cancel an account collection subscription
curl --request POST \
  --url https://api.yorlet.com/v1/account_collection_subscriptions/{id}/cancel \
  --header 'Authorization: <api-key>'
{
  "id": "<string>",
  "created": 123,
  "object": "account_collection_subscription",
  "account_collection_data": {
    "amount": 2,
    "currency": "gbp",
    "description": "<string>",
    "destination": "<string>",
    "expense": {
      "description": "<string>"
    },
    "fee": {
      "discount": 50
    },
    "tax_percent": 50,
    "unit": "<string>",
    "workspace": "<string>"
  },
  "billing_cycles": 123,
  "interval_count": 123,
  "last_account_collection_error": {
    "message": "<string>",
    "type": "<string>"
  },
  "next_collection_date": 123,
  "next_period_end": 123,
  "next_period_start": 123,
  "owner": "<string>",
  "start_date": 123,
  "timezone": "<string>",
  "account": "<string>",
  "deleted": false,
  "billing_cycles_count": 0,
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Response

200 - application/json

Returns the canceled account collection subscription.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
account_collection_subscription
account_collection_data
object
required

The data used to create account collections on each billing cycle.

billing_cycles
integer
required

The total number of billing cycles the subscription runs for. Use 0 for unlimited.

interval
enum<string>
required

The billing interval for the subscription.

Available options:
month,
week
interval_count
integer
required

The number of intervals between each billing cycle.

last_account_collection_error
object
required

The most recent error encountered when generating an account collection.

next_collection_date
integer | null
required

The next date an account collection will be generated.

next_period_end
integer | null
required

The end of the next billing period.

next_period_start
integer | null
required

The start of the next billing period.

owner
required

The owner the subscription is for.

start_date
integer | null
required

The start date of the subscription.

status
enum<string>
required

The current status of the subscription.

Available options:
active,
canceled,
complete,
scheduled
timezone
string | null
required

The timezone used to compute billing cycles.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

billing_cycles_count
integer
default:0

The number of billing cycles that have been processed.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.