web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Power Pages and Stripe
Power Pages
Unanswered

Power Pages and Stripe

(0) ShareShare
ReportReport
Posted on by 150

Hi All,

 

I am building a Payment Portal on Power Pages. The idea is a user will login to our portal and make a payment for their invoices. For this, I added a button on a page using the online VS code editor. Please see the screenshot below for an example.

 

bssienes_0-1672937929650.png

 

The challenge I am having right now is communicating with Stripe - a payment platform, at the time I click on ‘Pay selected invoices’ button. I will also have similar buttons to add/delete a new credit card etc. I don’t want to put my business logic into the same HTML file, inside the onClick event of this button, since I will be using sensitive information such as a secret key to communicate with Stripe. Instead, my idea was to call Business Central when the button is clicked, and then call Stripe within AL to make a payment. But I can’t call Business Central API directly from Javascript&HTML either since I will also need authorization password to call a Business Central API.

 

So, my solution to this wass to create a HTTP request inside the onClick event of a button. I created a Power Automate flow which starts with a ‘when a HTTP request is received’ trigger. Now, I can add new steps to call Business Central. Here is an example of a Power automate flow I created to call Business Central API, and return back the list of Credit cards in the response array to the Power page.

 

bssienes_1-1672937929651.png

 

 

My problem with this solution is,

1) I want to pass a parameter while calling the Business Central Api to use it in my Stripe call in AL as I want to fetch information for a specific customer. I don’t see an option to pass a parameter in Power Automate. Is this possible?

2) For each button, I will need to use a HTTP URL to start the Power Automate flow. Do we need to modify the HTTP URL in the code for each customer we deploy our solution to? Will they need to change the source code manually?

 

bssienes_3-1672938033966.png

 

What do you suggest? Are these problems fixable? How can I safely call the Stripe? Or should we take a totally different approach?

Categories:
I have the same question (0)
  • Inogic Profile Picture
    1,291 Moderator on at

    Hi,

     

    Regarding "1) I want to pass a parameter while calling the Business Central Api to use it in my Stripe call in AL as I want to fetch information for a specific customer. I don’t see an option to pass a parameter in Power Automate. Is this possible?"

     

    You can pass parameter to Power Automate from Portal.

     

    And in Power Automate, you need to define your input parameters(whose values needs to be passed from Portal)in a JSON format like given below. In our example we are passing quote id(guid of quote record)and some set of locations in a string format. So we have two string type input parameters as shown below in Power Automate

     

    Inogic_1-1674112003041.png

    Now that you have defined parameters in Power Automate, you can refer code on how to send parameters from Portal as seen below

    Inogic_2-1674112378881.png

     

    Based on the screenshot you have provided, kindly please check the lines i have highlighted in red and you can compare with your screenshot-which are the changes you need to do in current code in your portal.

     

    Regarding "2) For each button, I will need to use a HTTP URL to start the Power Automate flow. Do we need to modify the HTTP URL in the code for each customer we deploy our solution to? Will they need to change the source code manually?"

     

    If you have your customer is logged in Portal user, then i would suggest to pass customer id dynamically as parameter from Portal to your Power Automate and you ensure Customer Id is also defined as one of input parameters in Power Automate. So this way even if different customers logs into the portal, you wont need to hardcode the ids. We are giving this suggestion assuming you have a single CRM and with different customers you meant different contacts in your CRM.

     

    Hope this helps.

     

    If you find this solution helpful, please mark it as accepted solution.

     

    Thanks!
    Inogic Professional Services
    An expert technical extension for your techno-functional business needs
    Power Platform/Dynamics 365 CRM
    Drop an email at crm@inogic.com 
    Service: http://www.inogic.com/services/ 
    Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/ 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 41

#2
11manish Profile Picture

11manish 28

#2
sannavajjala87 Profile Picture

sannavajjala87 28 Super User 2026 Season 1

Last 30 days Overall leaderboard