Accounts
Subscriptions
Subscriptions endpoint reference.
List
Lists all of an account's subscriptions.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. |
php
$response = $client->accounts()->subscriptions()->list('ACCOUNT_ID');
Create
Creates an account subscription.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
values | array | No | [] | Subscription values, e.g. frequency, rate_plan. |
php
$response = $client->accounts()->subscriptions()->create('ACCOUNT_ID', []);
Update
Updates an account subscription.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
subscriptionId | string | Yes | Subscription identifier tag. | |
values | array | No | [] | Subscription values, e.g. frequency, rate_plan. |
php
$response = $client->accounts()->subscriptions()->update('ACCOUNT_ID', 'SUBSCRIPTION_ID', []);
Append
Smartly applies the incoming subscription into the lifecycle of the subscription.
Unlike update(), which overwrites, this asks Cloudflare to work out how
the supplied subscription should be folded into the existing one.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
subscriptionId | string | Yes | Subscription identifier tag. | |
values | array | No | [] | Subscription values, e.g. frequency, rate_plan. |
php
$response = $client->accounts()->subscriptions()->append('ACCOUNT_ID', 'SUBSCRIPTION_ID', []);
Delete
Deletes an account's subscription.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
subscriptionId | string | Yes | Subscription identifier tag. |
php
$response = $client->accounts()->subscriptions()->delete('ACCOUNT_ID', 'SUBSCRIPTION_ID');

