# Payment integration with Stripe

**URL:** <https://community.appfarm.io/t/payment-integration-with-stripe/875>\
**Category:** Ask the community\
**Created:** [November 26, 2023, 7:52pm UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875 "2023-11-26T19:52:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmaustad](https://avatars.discourse-cdn.com/v4/letter/l/71e660/32.png) [@lmaustad](https://community.appfarm.io/u/lmaustad)\
**Post date:** [November 26, 2023, 7:52pm UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875/1 "2023-11-26T19:52:57Z")

</div>

Hi!  
I am struggling with finalizing the payment integration with Stripe a bit, mainly the response mapping. I need some variable to “confirm” that the payment has succeeded, but I cannot really find a very easy way to do this and am in need for some advice. It would be enough with a boolean response on whether or not the session is successful or not!

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![karlh](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/karlh/32/2567_2.png) [@karlh](https://community.appfarm.io/u/karlh)\
**Post date:** [November 27, 2023, 9:51am UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875/2 "2023-11-27T09:51:26Z")

</div>

Hi there!  
We have a guide for integrating Stripe.  
It mentions use of “success\_url” and “failure\_url” which might be what you are looking for?

> **[Integrate with a payment provider](https://docs.appfarm.io/how-to/integrations/integrate-with-a-payment-provider)**

Let me know if the guide does not answer your questions!

---

<div class="post-metadata">

**Author:** ![lmaustad](https://avatars.discourse-cdn.com/v4/letter/l/71e660/32.png) [@lmaustad](https://community.appfarm.io/u/lmaustad)\
**Post date:** [November 27, 2023, 10:12am UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875/3 "2023-11-27T10:12:22Z")

</div>

Hi!  
Thats right, I have used this guide. However, I need some sort of variable in order to “verify” in the data source that the customer has actually payed. In order to give access to certain features, and I struggle doing this unless I brute force with a condition on the URL. Is there no variable in the response data which one can retrieve that gives the status or process approval in a boolean value?

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [November 27, 2023, 12:27pm UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875/4 "2023-11-27T12:27:38Z")

</div>

Hello!

I believe you are refering to step 7 of that guide. Step 7 has now been updated with an actual example.

A successful payment in Stripe must be handles by a Service Endpoint in Appfarm. Not from the App. Stripe sends a specific JSON to an endpoint (as defined in step 9 in the guide) when a payment is successful (or not). So, the action that is triggered from that Appfarm endpoint need to check if the payment status is `paid`.

---

<div class="post-metadata">

**Author:** ![lmaustad](https://avatars.discourse-cdn.com/v4/letter/l/71e660/32.png) [@lmaustad](https://community.appfarm.io/u/lmaustad)\
**Post date:** [November 27, 2023, 5:49pm UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875/5 "2023-11-27T17:49:56Z")

</div>

Thank you, that was very helpful! Also, I am a bit unsure about the alias slug? Is that just the name of the service or am I completely off?

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [November 27, 2023, 7:29pm UTC](https://community.appfarm.io/t/payment-integration-with-stripe/875/6 "2023-11-27T19:29:27Z")

</div>

Great!

URLs to Appfarm service endpoints are in this form:  
https://[HOSTNAME].appfarm.app/api/services/[service alias slug]/[Service endpoint readable ID]

- **Service alias slug** is defined in **Service Settings** (top-right cog wheel) → **Alias Slug**
- **Service endpoint readable id** is defined in the **Readable ID** property on the Service Endpoint

You may also see these by clicking **Explore API** from the Services menu in Appfarm Create (opening Swagger, for testing the Service Endpoints)
