# Create Subscription

**URL:** <https://developer.squareup.com/forums/t/create-subscription/10962>\
**Category:** Questions\
**Created:** [October 8, 2023, 7:17am UTC](https://developer.squareup.com/forums/t/create-subscription/10962 "2023-10-08T07:17:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave89](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Dave89](https://developer.squareup.com/forums/u/Dave89)\
**Post date:** [October 8, 2023, 7:17am UTC](https://developer.squareup.com/forums/t/create-subscription/10962/1 "2023-10-08T07:17:54Z")

</div>

Hi Support,

I am trying to Create a Subscription to a Plan for a Customer.  
(not selling any phyisical product its just a fixed monthly payment for use of our services)  
I have created a Plan in the dashboard, added an ‘item’ to the Plan, set the item price.  
I have then set Frequency to Monthly - never ending.

I get stuck when using CreateSubscriptionRequest() trying to create a Subscription for a Customer to this Plan (customer/card already created successsfully):

```
    $body = new \Square\Models\CreateSubscriptionRequest(SQUARE_LOCATION_ID, $squareCustomerId);
    $body->setPlanVariationId(SQUARE_PYMNT_VARI_ID);
    $body->setStartDate(date("Y-m-d"));
    $body->setCardId($cardId);
    $body->setIdempotencyKey(uniqid());

```

I get the below error  
**ERROR: “Phases with RELATIVE pricing type must have phases on the subscription”**

I then queried the SUBSCRIPTION\_PLAN using:  
$client-\>getCatalogApi()-\>listCatalog(null, ‘SUBSCRIPTION\_PLAN’)

and noticed that there is a ‘Phase’ with pricing set to RELATIVE. I suspect this should be set to STATIC . However there is no option to set this value within the dashboard.  
Is there a way to change this value to STATIC via the API? Is this even the correct solution or am I way off?

Much Appreciated,  
Dave

---

<div class="post-metadata">

**Author:** ![Dave89](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Dave89](https://developer.squareup.com/forums/u/Dave89)\
**Post date:** [October 9, 2023, 8:44am UTC](https://developer.squareup.com/forums/t/create-subscription/10962/2 "2023-10-09T08:44:01Z")

</div>

Should I use the dashboard at all for creating the Plan itself? Or would it be better to create the Plan via API?  
If via API, I would also really appreciate a code snippet of the whole Plan-creation process as I feel I have it incorrect (sorry for my lack of understanding).  
I am not sure if I need to create an ‘item’ or not.  
Is it enough to create a single Plan and a single Plan\_Variation with one phase and pricing info ?  
Would this be enough for customers to subscribe to, since i’m not selling an actual item, rather a subscription to the Plan itself?

---

<div class="post-metadata">

**Author:** ![amity](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@amity](https://developer.squareup.com/forums/u/amity)\
**Post date:** [October 9, 2023, 10:38am UTC](https://developer.squareup.com/forums/t/create-subscription/10962/3 "2023-10-09T10:38:42Z")

</div>

I have same issue,  
i created subscription plan and link article.

Doing this I have null $api\_response = $this-\>client-\>getCatalogApi()-\>listCatalog(null, ‘SUBSCRIPTION\_PLAN’);

and i can’t get subscription\_plan\_id …

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 9, 2023, 4:15pm UTC](https://developer.squareup.com/forums/t/create-subscription/10962/4 "2023-10-09T16:15:43Z")

</div>

That error is happening cause of the change in the subscription model that took place with the 2023-06-08 release. All subscription created in the Dashboard will be a `RELATIVE` subscriptions. If you’d like to create a `STATIC` subscription you’ll need to do it with the APIs. Also here is the [Documentation](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations) on how to use the new subscription model with examples. 🙂

---

<div class="post-metadata">

**Author:** ![Dave89](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Dave89](https://developer.squareup.com/forums/u/Dave89)\
**Post date:** [October 9, 2023, 4:59pm UTC](https://developer.squareup.com/forums/t/create-subscription/10962/5 "2023-10-09T16:59:19Z")

</div>

Thanks Bryan - That documentation does not mention the creation of any ITEM, so I will skip this step and just apply STATIC PRICING to my PLAN\_VARIATION\_PHASE - I am guessing this will be enough for Customers to Subscribe to?  
(Was just a little confused as the Dashboard forces you to create an ITEM which has its own PRICING - then attaches the ITEM to the PLAN), will try the documentation method instead:  
Create Plan  
- Create Plan Variation  
- Create at least one Phase  
- Create Pricing for Phase

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 9, 2023, 5:05pm UTC](https://developer.squareup.com/forums/t/create-subscription/10962/6 "2023-10-09T17:05:49Z")

</div>

This walkthrough does have you create the subscription with an `ITEM` similar to the Dashboard. An `ITEM` in your scenario is what they’re subscribing to. You’ll still use an existing or create create a new one to use for subscriptions. 🙂

---

<div class="post-metadata">

**Author:** ![Dave89](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Dave89](https://developer.squareup.com/forums/u/Dave89)\
**Post date:** [October 9, 2023, 5:48pm UTC](https://developer.squareup.com/forums/t/create-subscription/10962/7 "2023-10-09T17:48:16Z")

</div>

**Each `Phase` of the `SubscriptionPlanVariation` contains data about the `pricing` of the item or service being sold:**  
\*\*\* The type of pricing can be `RELATIVE` or `STATIC`. If it’s `STATIC`, a `price` amount must be set, which overrides the price of any items subscribable through the subscription plan. If it’s `RELATIVE`, the price of the subscribable items is included in an [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#order-templates) on the subscription and the combined item prices are used for the price of the `PlanVariation`.\*\*

above is from the documentation.  
Looks like STATIC pricing on the SubscriptionPlanVariation PHASE will override any ITEMS pricing - so i’m just creating a ‘dud’ item for the sake of it, then overriding the price?

\*\* UPDATE - I done as above (created a $0 item) - then set STATIC pricing on the PHASE. This did seem override the item price of $0 to my PHASE pricing as expected - But now the Plan is flagged as a’ Legacy Plan’ in my dashboard 😃 . I suspect this is ok and will proceed

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 9, 2023, 7:53pm UTC](https://developer.squareup.com/forums/t/create-subscription/10962/8 "2023-10-09T19:53:11Z")

</div>

Great! Yes, this is still supported. 🙂

---

<div class="post-metadata">

**Author:** ![vkvia6](https://avatars.discourse-cdn.com/v4/letter/v/49beb7/32.png) [@vkvia6](https://developer.squareup.com/forums/u/vkvia6)\
**Post date:** [April 19, 2026, 5:20pm UTC](https://developer.squareup.com/forums/t/create-subscription/10962/10 "2026-04-19T17:20:09Z")

</div>

@Bryan-Square @Bryan-Square2.0 Is this correct approach, or is there any other workaround available?
