# Create subscription API

**URL:** <https://developer.squareup.com/forums/t/create-subscription-api/19202>\
**Category:** Questions\
**Created:** [October 18, 2024, 5:36pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202 "2024-10-18T17:36:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 18, 2024, 5:36pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/1 "2024-10-18T17:36:20Z")

</div>

Hi,

I’m trying to follow the steps in the Subscription Api docs:

> **[Subscriptions API](https://developer.squareup.com/docs/subscriptions/overview)**
>
> Learn about using the Square Subscriptions API to create and manage subscriptions in a subscription plan.

And now I’m stuck at the last step: Create subscription API  
which asks for a customer id but I’m not trying to subscribe a customer to my service. Rather I’m trying to subscribe a merchant to use my KDS app.

The reason for handling the subscription our selves is that my company is located in Canada and according to Square company the subscription is not available outside of US yet.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [October 18, 2024, 5:36pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/2 "2024-10-18T17:36:37Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:  
[https://developer.squareup.com/docs/app-marketplace/requirements/subscriptions-api](https://developer.squareup.com/docs/app-marketplace/requirements/subscriptions-api)

> **[Subscription Plan Checkout](https://developer.squareup.com/docs/checkout-api/subscription-plan-checkout)**
>
> Learn how to create a quick pay checkout link for a subscription plan.

> **Additional Documentation**
>
> [https://developer.squareup.com/docs/get-started/create-an-account](https://developer.squareup.com/docs/get-started/create-an-account)  
> [Take a Credit Card Payment](https://developer.squareup.com/docs/reader-sdk/quick-start/step-5)  
> [Get Started](https://developer.squareup.com/docs/get-started)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<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 18, 2024, 5:49pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/3 "2024-10-18T17:49:34Z")

</div>

Since your using the Subscriptions API to charge sellers a subscription to use your integration the merchant will be your customer. You should create a customer profile for that seller and use the generated `customer_id` when creating the subscription. 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 18, 2024, 5:53pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/4 "2024-10-18T17:53:33Z")

</div>

create a customer profile for the merchant? where? on the merchant side?

---

<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 18, 2024, 6:04pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/5 "2024-10-18T18:04:24Z")

</div>

With the [Customers API](https://developer.squareup.com/docs/customers-api/what-it-does) or in your Square account. 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 18, 2024, 7:36pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/6 "2024-10-18T19:36:55Z")

</div>

It is weird but ok. I did that and created a customer on the merchant side using its own location data. However, I got stuck again. Because the Subscription Api is failing because the customer which I created does not have an email address. Which is a problem because the merchant itself doesn’t have an email address that I can find in the location data.

Is there another place to look for such info? also, that means new clients cannot subscribe to my app if they don’t have an email address that is already present in their Square account.

What should I do next?

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 20, 2024, 7:23pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/7 "2024-10-20T19:23:16Z")

</div>

Another issue, the subscription api is not working.

POST /v2/subscriptions/search

“query”: {  
“filter”: {  
“source\_names”: [  
“My App”  
]}}

returns empty object {} even though I know that I have a new active subscribed user.

“query”: {  
“filter”: {  
“location\_ids”: [  
“location\_id-1”  
]}}

this fails with the following even though the id is a valid location id:  
{"code": "LOCATION\_MISMATCH","detail": "The provided location ID `L8ZG1S4PC **** ` cannot be accessed by the authorized merchant.","category": "INVALID\_REQUEST\_ERROR"}

“query”: {  
“filter”: {  
“customer\_ids”: [  
“customer-id-1”  
],}}

fails with the following even though the customer id is a valid:  
{"code": "CUSTOMER\_NOT\_FOUND","detail": "The provided customer ID `6BE0ZDGPF ****************** ` does not match any known customer.","category": "INVALID\_REQUEST\_ERROR"}

any idea?

---

<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 21, 2024, 4:19pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/8 "2024-10-21T16:19:56Z")

</div>

If you [SearchTeamMembers](https://developer.squareup.com/reference/square/team-api/search-team-members) and query for `is_owner` that team member profile will have the email address of the Square account. 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 6:01pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/9 "2024-10-21T18:01:04Z")

</div>

ok, I will try that.

What about the subscription api failures?

---

<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 21, 2024, 6:15pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/10 "2024-10-21T18:15:35Z")

</div>

What’s your application ID? 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 7:03pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/11 "2024-10-21T19:03:10Z")

</div>

Expo KDS  
sq0idp-KU0LNcFrgw4XGCdlKTaW7A

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 9:52pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/12 "2024-10-21T21:52:37Z")

</div>

Sorry Bryan, you are not being responsive and I don’t see lots of posts that might keep you so busy from completing such a trivial task. So I will flag this issue next time

---

<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 21, 2024, 9:55pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/13 "2024-10-21T21:55:04Z")

</div>

Please note that we have other support channels that aren’t public facing that we have to respond to developer issues. Also where did you get the `customer_id`. Was it from your customer directory? 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 10:00pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/14 "2024-10-21T22:00:40Z")

</div>

Please be more responsive,

1. you started by leaving my questions unanswered for couple days before commenting
2. Then leaving a question pending your answer from Friday to Monday even though it takes a minute to answer like the one posted 6 hours ago
3. And now it is a second level, you ignore my question and you only answered because I had to repeat my question for a second time. You have seen the two questions but intentionally ignored one of them. You did not even leave a follow up message

Please just understand that any business has a limited resources and time.

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 10:02pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/15 "2024-10-21T22:02:17Z")

</div>

forget the customer id. why the subscription api is returning an empty object {} when I query for source\_names.

---

<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 21, 2024, 10:14pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/16 "2024-10-21T22:14:26Z")

</div>

If an empty response was returned that means that the `source_name` that you queried for doesn’t exist. 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 10:26pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/17 "2024-10-21T22:26:29Z")

</div>

The source\_name that I used is my app name Expo KDS which has at least one subscriber

---

<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 21, 2024, 10:42pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/18 "2024-10-21T22:42:02Z")

</div>

The `source_name` query is currently only available with subscriptions that are for App Subscription Billing. Since you create a subscription with the Subscriptions API since App Subscription Billing isn’t currently available outside of the US it won’t return results based on your application name. You’ll have to filter based on the customer\_ids you create for each subscription that will represent a customer that’s using your application. 🙂

---

<div class="post-metadata">

**Author:** ![awkasem](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@awkasem](https://developer.squareup.com/forums/u/awkasem)\
**Post date:** [October 21, 2024, 10:46pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/19 "2024-10-21T22:46:34Z")

</div>

The only way to know how many subscribers my app has is to query with the customer ids?

There is no other ways?

---

<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 21, 2024, 11:08pm UTC](https://developer.squareup.com/forums/t/create-subscription-api/19202/20 "2024-10-21T23:08:02Z")

</div>

At this time that’s the only way to know since App Subscription Billing isn’t available outside of the US. 🙂

[Next page](https://developer.squareup.com/forums/t/create-subscription-api/19202.md?page=2)
