# Payment MFE returns 404

**URL:** <https://discuss.openedx.org/t/payment-mfe-returns-404/9547>\
**Category:** Site Operations Help\
**Tags:** ecommerce, tutor\
**Created:** [March 10, 2023, 10:09am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547 "2023-03-10T10:09:26Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Master\_kratos](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Master\_kratos](https://discuss.openedx.org/u/Master_kratos)\
**Post date:** [March 10, 2023, 10:09am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/1 "2023-03-10T10:09:26Z")

</div>

(this topic was moved from [this conversation](https://discuss.openedx.org/t/potential-payment-mfe-with-olive/8948))

Hello @regis. I still experience this issue, might even add that mine is a bit weirder.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/a/a338b3716b4b3483de1d1e7a2ef01ecc668dec64.png)

As shown in the picture above, the /payment url flat out returns a 404 error code. Both LMS and Ecommerce do not show any concerning issues that may relate to the error thrown in the payment page.

LMS Logs:

```auto
tutor_local-lms-1 | [pid: 7|app: 0|req: 35/91] [172.18.0.2](http://172.18.0.2/) () {60 vars in 3655 bytes} [Fri Mar 10 09:40:17 2023] GET /oauth2/authorize?client_id=ecommerce-sso&redirect_uri=https%3A%2F%[2Fecommerce.fupi.live](http://2fecommerce.fupi.live/)%2Fcomplete%2Fedx-oauth2%2F%3Fredirect_state%3Dhs6fYkARO8QSCK9LZmf9uo8BgrVClFtf&state=hs6fYkARO8QSCK9LZmf9uo8BgrVClFtf&response_type=code&scope=user_id+profile+email => generated 0 bytes in 42 msecs (HTTP/1.1 302) 7 headers in 475 bytes (1 switches on core 0)
tutor_local-lms-1 | 2023-03-10 09:40:17,383 INFO 19 [tracking] [user None] [ip [34.142.48.13](http://34.142.48.13/)] [logger.py:41](http://logger.py:41/) - {"name": "/oauth2/access_token", "context": {"user_id": null, "path": "/oauth2/access_token", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "", "ip": "[34.142.48.13](http://34.142.48.13/)", "agent": "python-requests/2.28.1", "host": "[fupi.live](http://fupi.live/)", "referer": "", "accept_language": "", "event": "{\"GET\": {}, \"POST\": {\"grant_type\": [\"authorization_code\"], \"code\": [\"pLtHP4P2mYYqb5llb7NgkrgV3Ndw45\"], \"client_id\": [\"ecommerce-sso\"], \"client_secret\": [\"NiSQTjfK\"], \"redirect_uri\": [\"https://ecommerce.fupi.live/complete/edx-oauth2/?redirect_state=hs6fYkARO8QSCK9LZmf9uo8BgrVClFtf\"], \"token_type\": [\"jwt\"]}}", "time": "2023-03-10T09:40:17.383352+00:00", "event_type": "/oauth2/access_token", "event_source": "server", "page": null}
tutor_local-lms-1 | [pid: 19|app: 0|req: 36/92] [172.18.0.2](http://172.18.0.2/) () {42 vars in 589 bytes} [Fri Mar 10 09:40:17 2023] POST /oauth2/access_token => generated 835 bytes in 35 msecs (HTTP/1.1 200) 8 headers in 516 bytes (1 switches on core 0)
tutor_local-lms-1 | 2023-03-10 09:40:17,751 INFO 7 [tracking] [user None] [ip [34.142.48.13](http://34.142.48.13/)] [logger.py:41](http://logger.py:41/) - {"name": "/enterprise/api/v1/enterprise-learner/", "context": {"user_id": null, "path": "/enterprise/api/v1/enterprise-learner/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "", "ip": "[34.142.48.13](http://34.142.48.13/)", "agent": "python-requests/2.28.1 edx-rest-api-client/5.5.0 [172.18.0.13](http://172.18.0.13/)", "host": "[fupi.live](http://fupi.live/)", "referer": "", "accept_language": "", "event": "{\"GET\": {\"username\": [\"Calvin\"]}, \"POST\": {}}", "time": "2023-03-10T09:40:17.751632+00:00", "event_type": "/enterprise/api/v1/enterprise-learner/", "event_source": "server", "page": null}
tutor_local-lms-1 | [pid: 7|app: 0|req: 36/93] [172.18.0.2](http://172.18.0.2/) () {40 vars in 1312 bytes} [Fri Mar 10 09:40:17 2023] GET /enterprise/api/v1/enterprise-learner/?username=Calvin => generated 8453 bytes in 26 msecs (HTTP/1.1 404) 7 headers in 665 bytes (1 switches on core 0)
tutor_local-lms-1 | 2023-03-10 09:47:45,166 INFO 19 [tracking] [user None] [ip [149.154.161.214](http://149.154.161.214/)] [logger.py:41](http://logger.py:41/) - {"name": "/enterprise/api/v1/enterprise-learner/", "context": {"user_id": null, "path": "/enterprise/api/v1/enterprise-learner/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "", "ip": "[149.154.161.214](http://149.154.161.214/)", "agent": "TelegramBot (like TwitterBot)", "host": "[fupi.live](http://fupi.live/)", "referer": "", "accept_language": "en-US,en;q=0.5", "event": "{\"GET\": {\"username\": [\"Calvin\"]}, \"POST\": {}}", "time": "2023-03-10T09:47:45.165813+00:00", "event_type": "/enterprise/api/v1/enterprise-learner/", "event_source": "server", "page": null}
tutor_local-lms-1 | [pid: 19|app: 0|req: 37/94] [172.18.0.2](http://172.18.0.2/) () {42 vars in 826 bytes} [Fri Mar 10 09:47:45 2023] GET /enterprise/api/v1/enterprise-learner/?username=Calvin => generated 8453 bytes in 32 msecs (HTTP/1.1 404) 7 headers in 665 bytes (1 switches on core 0)
tutor_local-lms-1 | 2023-03-10 09:48:28,850 INFO 7 [tracking] [user None] [ip [52.167.144.48](http://52.167.144.48/)] [logger.py:41](http://logger.py:41/) - {"name": "/sitemap.txt", "context": {"user_id": null, "path": "/sitemap.txt", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "", "ip": "[52.167.144.48](http://52.167.144.48/)", "agent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/103.0.5060.134 Safari/537.36", "host": "[fupi.live](http://fupi.live/)", "referer": "", "accept_language": "", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2023-03-10T09:48:28.850594+00:00", "event_type": "/sitemap.txt", "event_source": "server", "page": null}
tutor_local-lms-1 | [pid: 7|app: 0|req: 37/95] [172.18.0.2](http://172.18.0.2/) () {44 vars in 703 bytes} [Fri Mar 10 09:48:28 2023] GET /sitemap.txt => generated 8385 bytes in 30 msecs (HTTP/1.1 404) 7 headers in 665 bytes (1 switches on core 0)

```

Ecommerce Logs:

```auto
tutor_local-ecommerce-1 | [pid: 11|app: 0|req: 12/54] [172.18.0.2](http://172.18.0.2/) () {60 vars in 1360 bytes} [Fri Mar 10 09:39:58 2023] GET /login/?next=/basket/add/%3Fsku%3DA68A349 => generated 0 bytes in 9 msecs (HTTP/1.1 302) 6 headers in 229 bytes (1 switches on core 0)
tutor_local-ecommerce-1 | [pid: 7|app: 0|req: 14/55] [172.18.0.2](http://172.18.0.2/) () {60 vars in 1382 bytes} [Fri Mar 10 09:39:59 2023] GET /login/edx-oauth2/?next=/basket/add/%3Fsku%3DA68A349 => generated 0 bytes in 13 msecs (HTTP/1.1 302) 9 headers in 714 bytes (1 switches on core 0)
tutor_local-ecommerce-1 | [pid: 11|app: 0|req: 13/56] [172.18.0.2](http://172.18.0.2/) () {60 vars in 3435 bytes} [Fri Mar 10 09:40:17 2023] GET /complete/edx-oauth2/?redirect_state=hs6fYkARO8QSCK9LZmf9uo8BgrVClFtf&code=pLtHP4P2mYYqb5llb7NgkrgV3Ndw45&state=hs6fYkARO8QSCK9LZmf9uo8BgrVClFtf => generated 0 bytes in 73 msecs (HTTP/1.1 302) 10 headers in 646 bytes (1 switches on core 0)
tutor_local-ecommerce-1 | 2023-03-10 09:40:17,681 INFO 7 [ecommerce.extensions.basket.views] /openedx/ecommerce/./ecommerce/extensions/basket/[views.py:430](http://views.py:430/) - Starting payment flow for user [Calvin] for products [['A68A349']].
tutor_local-ecommerce-1 | 2023-03-10 09:40:17,771 INFO 7 [ecommerce.enterprise.api] /openedx/ecommerce/./ecommerce/enterprise/[api.py:199](http://api.py:199/) - Unable to retrieve enterprise learner data for User: Calvin, Exception: 404 Client Error: Not Found for url: https://fupi.live/enterprise/api/v1/enterprise-learner/?username=Calvin
tutor_local-ecommerce-1 | [pid: 7|app: 0|req: 15/57] [172.18.0.2](http://172.18.0.2/) () {60 vars in 3279 bytes} [Fri Mar 10 09:40:17 2023] GET /basket/add/?sku=A68A349 => generated 0 bytes in 121 msecs (HTTP/1.1 303) 7 headers in 246 bytes (1 switches on core 0)

```

Only caddy and mfe show, in the logs that there is an error somewhere.

```auto
Caddy and mfe logs:
tutor_local-mfe-1 | {"level":"error","ts":1678441481.0026057,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"[172.18.0.2:56874](http://172.18.0.2:56874/)","proto":"HTTP/1.1","method":"GET","host":"[apps.fupi.live](http://apps.fupi.live/)","uri":"/payment"},"user_id":"","duration":0.00012625,"size":0,"status":404}
tutor_local-caddy-1 | {"level":"error","ts":1678441481.0028024,"logger":"http.log.access.log4","msg":"handled request","request":{"remote_ip":"[41.59.193.232](http://41.59.193.232/)","remote_port":"3411","proto":"HTTP/2.0","method":"GET","host":"[apps.fupi.live](http://apps.fupi.live/)","uri":"/payment","tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"[apps.fupi.live](http://apps.fupi.live/)"}},"user_id":"","duration":0.00133419,"size":0,"status":404}

```

We had to downgrade to Nutmeg to get the payment page working. We still have no luck of getting the payment page back up, let alone find out the cause of the issue. Would appreciate any help here.

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [March 10, 2023, 10:28am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/2 "2023-03-10T10:28:49Z")

</div>

I moved your answer to a new topic, as the issue you are describing is different from the original one.

The payment MFE will only be available if you re-build the MFE image. Did you run `tutor images build mfe`?

---

<div class="post-metadata">

**Author:** ![Master\_kratos](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Master\_kratos](https://discuss.openedx.org/u/Master_kratos)\
**Post date:** [March 10, 2023, 2:40pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/3 "2023-03-10T14:40:50Z")

</div>

Sorry for the late reply @regis . We did a couple of times, and we haven’t faced any issues while building MFE.

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [March 10, 2023, 4:41pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/4 "2023-03-10T16:41:41Z")

</div>

What version of Tutor and the ecommerce/mfe plugins are you running?

```auto
tutor --version
tutor plugins list

```

---

<div class="post-metadata">

**Author:** ![Master\_kratos](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Master\_kratos](https://discuss.openedx.org/u/Master_kratos)\
**Post date:** [March 10, 2023, 7:26pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/5 "2023-03-10T19:26:01Z")

</div>

@Niko_Stefan

---

<div class="post-metadata">

**Author:** ![Niko\_Stefan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/niko_stefan/32/5011_2.png) [@Niko\_Stefan](https://discuss.openedx.org/u/Niko_Stefan)\
**Post date:** [March 10, 2023, 7:45pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/6 "2023-03-10T19:45:16Z")

</div>

Thanks @Master_kratos for the ping. Hello @regis

Tutor Version: v15.3.1 ( latest )  
Tutor-ecommerce: v15.0.2  
Tutor-mfe: v15.0.5

---

<div class="post-metadata">

**Author:** ![sambapete](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sambapete/32/4100_2.png) [@sambapete](https://discuss.openedx.org/u/sambapete)\
**Post date:** [March 10, 2023, 8:17pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/7 "2023-03-10T20:17:02Z")

</div>

There is something I just caught on by looking at your screenshot that cannot find [https://apps.fupi.live/payment](https://apps.fupi.live/payment) and the logs that only show links to [http://fupi.live](http://fupi.live).

Could there be an SSL configuration issue between your LMS and the different apps ?  
I also see links to [http://2fecommerce.fupi.live](http://2fecommerce.fupi.live)

Just curious.

---

<div class="post-metadata">

**Author:** ![Niko\_Stefan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/niko_stefan/32/5011_2.png) [@Niko\_Stefan](https://discuss.openedx.org/u/Niko_Stefan)\
**Post date:** [March 11, 2023, 6:53am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/8 "2023-03-11T06:53:10Z")

</div>

Good eyes @sambapete. Wish I could say for certain if it is or isn’t an SSL configuration issue. We had issues with Cloudflare over SSL configurations sometime ago, but we changed our DNS Providers. We usually let Tutor handle everything and we try to avoid tinkering with anything inside Tutor’s domain.

---

<div class="post-metadata">

**Author:** ![Niko\_Stefan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/niko_stefan/32/5011_2.png) [@Niko\_Stefan](https://discuss.openedx.org/u/Niko_Stefan)\
**Post date:** [March 13, 2023, 8:38am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/9 "2023-03-13T08:38:41Z")

</div>

Hello @sambapete @regis. The SSL misconfiguration was an interesting theory, hence wanted to give it a go again without any SSL configuration. This time, the payment page hasn’t returned a 404 response.

What would be the best SSL configuration, do you think?

For context, we used Caddy’s SSL certificates generated during `tutor local launch`.

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [March 13, 2023, 9:58am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/10 "2023-03-13T09:58:43Z")

</div>

Your question inspired me to write this issue: [Many users have trouble figuring out which ingress hosts need to be proxied · Issue #7 · openedx/wg-devops · GitHub](https://github.com/openedx/wg-devops/issues/7)

---

<div class="post-metadata">

**Author:** ![Niko\_Stefan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/niko_stefan/32/5011_2.png) [@Niko\_Stefan](https://discuss.openedx.org/u/Niko_Stefan)\
**Post date:** [March 13, 2023, 12:08pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/11 "2023-03-13T12:08:37Z")

</div>

That’s a nice read @regis. It could be really helpful to a lot of users.

---

<div class="post-metadata">

**Author:** ![Niko\_Stefan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/niko_stefan/32/5011_2.png) [@Niko\_Stefan](https://discuss.openedx.org/u/Niko_Stefan)\
**Post date:** [March 13, 2023, 12:42pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/12 "2023-03-13T12:42:33Z")

</div>

Question @regis.

When Tutor prompts a user if they’d like to enable HTTPS during `tutor local launch`, does it set up SSL for specific domain / sub-domain (s) only or does it set up for all sub-domains involved in production?

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [March 13, 2023, 1:04pm UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/13 "2023-03-13T13:04:50Z")

</div>

This is a common source of confusion. Tutor does not really setup SSL for any service. When you answer “yes” to that SSL question during `tutor local launch`, all Tutor does is to configure all service urls to run on https. For instance, the Django settings for the LMS are setup to accept secure cookies, ecommerce and other IDAs are reached via https://…, etc.

Then, when `ENABLE_HTTPS=true` **and** `ENABLE_WEB_PROXY=true`, Caddy is configured to fetch certificates from Let’s Encrypt.

If `ENABLE_HTTPS=true` **and** `ENABLE_WEB_PROXY=false`, then Caddy assumes that SSL certificates are generated elsewhere – but we still use https urls for all services.

When `ENABLE_HTTPS=false` then we assume that all communications happen via http between the different services.

I highly recommend you carefully read this tutorial again: [Running Open edX behind a web proxy — Tutor documentation](https://docs.tutor.overhang.io/tutorials/proxy.html)  
In particular, I suspect that you may not have properly set the `X-Forwarded-*` headers in your proxy.

---

<div class="post-metadata">

**Author:** ![Niko\_Stefan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/niko_stefan/32/5011_2.png) [@Niko\_Stefan](https://discuss.openedx.org/u/Niko_Stefan)\
**Post date:** [March 14, 2023, 7:28am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/14 "2023-03-14T07:28:17Z")

</div>

Thank you @regis.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/e/e0015f89e879bc75925b71fd11133ab15fe98297.png) [@system](https://discuss.openedx.org/u/system)\
**Post date:** [June 12, 2023, 7:28am UTC](https://discuss.openedx.org/t/payment-mfe-returns-404/9547/15 "2023-06-12T07:28:52Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
