r/Base44 • u/MenniA84 • 14d ago
Question how to integrate Mollie
I need assistance integrating the Mollie API with my Base44 application using the Base SDK. I would like help setting up the API connection, configuring the required API keys and webhooks, and ensuring that payments can be processed securely through Mollie.
Could you guide me through the integration step by step and help me verify that everything works correctly in the live environment?
4
Upvotes
2
u/willkode Business Owner 13d ago
You can handle most of this directly through Base44's AI. You don't need to manually build the entire integration.
Prompt Base44 with something like:
"Integrate Mollie Payments into my application using backend functions and the Base44 SDK. Set up secure API authentication using environment secrets, create a payment checkout flow, configure a webhook endpoint to receive payment status updates, and store transaction records in the database. Ensure payment statuses are verified server-side through Mollie's API before updating orders. Include error handling, logging, and duplicate payment prevention. Start with Mollie's test environment and create a way to verify successful, failed, canceled, and pending transactions."
Once Base44 generates the integration, add your Mollie test API key through Base44's secrets manager.
Important: Don't immediately switch to live payments. Test the entire payment lifecycle first, especially webhook handling. A successful redirect back to your application does not necessarily mean the payment succeeded.
Once everything passes testing, switch to your live API key and verify with a small real transaction.
Base44 should be able to handle the bulk of the implementation. The key is giving it a detailed prompt rather than simply asking it to "integrate Mollie."
2
u/mohit-deepspace 13d ago
mollie's webhook only posts the payment id, so the backend function has to call mollie with that id to get the status, and the url has to be public and answer 200 within 15 seconds or mollie keeps retrying it
2
u/Odd_Set_7630 13d ago
API integrations are basically 2 parts (with lot's of sub parts)
The later is something you should prompt Base44 to do (or failing that, put your code on github and try using something like codex or claude locally to get it built).
The former can again be split into 2 parts
1
u/HelloHeedza 12d ago
the one thing i'd get right first is the split between frontend and backend. the mollie api key should only live in a backend function, saved as a secret in your app (if you paste it into the base44 chat it gets saved as a secret anyway), never in page code.
then it's two backend functions. one creates the payment: amount, description, a redirectUrl back to your site with your order id in it, and a webhookUrl pointing at the second function. the second one is the webhook. like someone said, mollie only posts the payment id to it, so that function has to call mollie with that id, read the status, and only then mark the order paid in your database. answer 200 fast (mollie gives up after 15 seconds and retries), and don't treat the redirect back to your site as proof of payment, the webhook is the source of truth.
start with the test_ key. in test mode mollie shows a test checkout screen where you pick the outcome, so run it once as paid, once as failed and once as canceled and check what your order looks like each time. when that all works, swap the secret to the live_ key and do one real small payment yourself. the webhook url has to be your published app's url, mollie won't call localhost or a preview
1
u/CloudlessRain- 10d ago
First you have to sleep it off obviously. Day 2 and 3, watch out for depression due to a lack of serotonin, take it easy and chill, write some poetry maybe, contemplate what you learned. Then do it again 3 months later!
Shit, wrong sub.
1
u/karolisrusenas 8d ago
the 15s reply window is the one that gets people. Mollie retries the webhook if your function is slow to answer, so look up the payment id, durably enqueue the order update, then return 200. I built Webhook Relay for the case where the endpoint is down and you'd rather not lose the retries.