# Subscriptions with pricing table - customer not found response

**URL:** https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450
**Category:** Support
**Tags:** subscriptions
**Created:** [August 26, 2024, 7:15pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450 "2024-08-26T19:15:23Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![roscopeco](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roscopeco](https://meta.discourse.org/u/roscopeco)
#### Post date: [August 26, 2024, 7:15pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/1 "2024-08-26T19:15:23Z")

</div>

Hi folks! I’m having an issue and have been hacking away at it for a few days, with no success, so hoping someone here might be able to help 🙂

_Discourse 3.4.0.beta1-dev_  
_Subscriptions 2.8.1 - f0b4984_  
_Docker install on Linux VM_

I’ve installed and activated the subscriptions plugin, and it works _most_ of the time when using the built-in pricing table (occasionally a user is not added to groups after a sub, but that’s a separate issue I guess).

However, I really need to use the Stripe pricing table and checkout for the familiar UX and trust it brings. To this end I have everything set up for webhooks, with all the secrets etc configured (currently using test mode so using test mode keys and secrets).

I can successfully go to the subscription page, go through the checkout flow from the pricing table, and check out with the test cards.

However, this results in no subscription being created in Discourse and no change in user’s groups, and looking at the web hooks in Stripe’s dashboard I see that they are getting a 422 response with the body:

```plaintext
{
  "errors": [
    "customer not found"
  ]
}

```

I’ve tried this with a few different users now, and the result is always the same.

Having looked in the database, I’m not seeing the customers noted in the Stripe webhook in the `discourse_subscriptions_customers` table, and no corresponding subscription in the `discourse_subscriptions_subscriptions` table either - which I guess _might_ be expected since the webhook call is never being processed?

FWIW I have verified Stripe webhook calls _can_ succeed in general - if I have the “use Stripe pricing table” setting disabled, and go through the built-in checkout to create a subscription then everything is fine - and if I then cancel the subscription from Stripe then the `customer.subscription.deleted` webhook comes through no problem.

Hoping I’ve just done something silly here and it’s not set up correctly, but really struggling to figure out what I need to do to get it working.

Thanks in advance!  
Ross

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [August 27, 2024, 4:00pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/2 "2024-08-27T16:00:53Z")

</div>

Sorry you are having issues, but thank you for bringing this up. Hopefully we can figure out what is going on. First question I have is are the products you have selected for the pricing table ones that you have created from inside of Discourse or were they created inside of Stripe?

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [August 27, 2024, 11:32pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/4 "2024-08-27T23:32:33Z")

</div>

> [@roscopeco](#):
>
> ```plaintext
> {
> "errors": [
> "customer not found"
> ]
> }
> 
> ```

I’m getting this error as well in my production environment that I set up, but not locally, so it’s kind of hard to debug. I’m looking into though!

---

<div class="post-metadata">

### Author: ![roscopeco](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roscopeco](https://meta.discourse.org/u/roscopeco)
#### Post date: [August 28, 2024, 4:12pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/5 "2024-08-28T16:12:16Z")

</div>

Thanks for the reply 🙂

I have tried it both ways, initially I had products set up in Stripe, and then found threads here suggesting they needed to be created inside of Discourse so I switched to doing that instead. However, I still see the same issue.

I’m _assuming_ (and apologies if incorrect) that the link to groups is driven by the product metadata? I see this under there:

 ![Screenshot 2024-08-28 at 17.09.00](https://global.discourse-cdn.com/meta/original/4X/c/e/9/ce9d1773905ef27309aa13374a30a701a011001c.png)

(The `group_name` varies depending on the price tier, which is what I’d expect based on how I have things set up in Discourse).

Thank you for looking into this, let me know if there’s anything more I can do to help 🙂

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [August 29, 2024, 9:06pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/6 "2024-08-29T21:06:18Z")

</div>

I’ve created a fix for the customer not found response with the pricing table. If you update your subscriptions plugin and try again it should work now.

---

<div class="post-metadata">

### Author: ![roscopeco](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roscopeco](https://meta.discourse.org/u/roscopeco)
#### Post date: [August 31, 2024, 10:14pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/7 "2024-08-31T22:14:50Z")

</div>

Apologies for the delay getting back to you, and thanks again for looking at it 🙂

I just got everything updated and did a quick test, and am still seeing the same response (i.e. customer not found) to the stripe web hooks.

Do you think I maybe should create a completely new pricing table / set of products and test with that, to rule out any issues that might be left over from previous tests (I did use a new user for this test, but the products are the ones that were there from before).

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [September 3, 2024, 8:00pm UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/8 "2024-09-03T20:00:53Z")

</div>

Can you confirm again what you have for the commit hash underneath the version number on the /admin/plugins page?

 ![CleanShot 2024-09-03 at 13.53.45@2x](https://global.discourse-cdn.com/meta/original/4X/3/8/d/38d92873e00f98e4e9d9e71f33c6beff5b6eed1a.png)

And is this for a subscription or a one-off purchase with the pricing table?

I did add a new setting for the subscription plugin for debugging. It is called `discourse_subscriptions_enable_verbose_logging`. Once that is enabled you can visit /logs and try the checkout process again and see if you see any output from it. Feel free to send me some screenshots of it in a PM and can help debug things further for you.

---

<div class="post-metadata">

### Author: ![roscopeco](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roscopeco](https://meta.discourse.org/u/roscopeco)
#### Post date: [September 7, 2024, 8:52am UTC](https://meta.discourse.org/t/subscriptions-with-pricing-table-customer-not-found-response/323450/9 "2024-09-07T08:52:48Z")

</div>

Sure, no probs. The commit hash I have is the same as in your screenshot, `f1b9c96` 🙂

This is for a subscription, with the pricing table.

Okay, awesome, thanks. I’ll try and enable that setting and take a look at the logs 🙂

Thanks again for your help 🙂
