- APPS
- MoMo Payment Provider 19.0
| Lines of Code | 1155 |
| Technical name | payment_momo_viin |
| License | OPL-1 |
| Website | https://viindoo.com/apps/modules/19.0/payment_momo_viin |
| Read description for | v 15.0 v 16.0 v 17.0 v 18.0 |
| Required Apps | Invoicing (account) Discuss (mail) |
| Included Dependencies | Viindoo Base Accounting Foundation Payment Gateway Currency Conversion |
Let customers pay with MoMo - and see every payment and refund confirmed in Odoo
For Vietnamese online shops and service providers collecting VND payments on orders and invoices
MoMo online payments for Vietnamese customers
Is this you?
Customers who keep money in the MoMo wallet cannot pay you online.
Someone has to check the MoMo site to learn whether an invoice was paid.
You are not sure a payment notification is genuine.
You cannot easily see which payments are done, pending or failed.
Refunds are made on the MoMo site and typed back into Odoo.
What changes
Customers cannot use the wallet
→ Customers pay in VND on MoMo's page with the MoMo wallet or QR code, a domestic ATM card or an international card
Checking the MoMo site
→ MoMo confirms, cancels or fails each payment automatically
Doubt about notifications
→ A notification with a forged signature is refused without any change
No clear payment list
→ Review each payment by reference, status and MoMo transaction id
Refunds outside Odoo
→ Refund all or part of a payment from Odoo, with MoMo's answer shown on the refund
How it works
System Administrator connects MoMo.
Enter the MoMo partner code, access key and secret key, then enable the provider.
Customer pays.
From an invoice or sales order, the customer selects MoMo and pays on MoMo's page with the wallet, QR code, domestic ATM card or international card.
MoMo notifies Odoo.
The payment is confirmed, canceled or marked as failed when MoMo's signed notification arrives. If the customer returns first, the status page shows the status MoMo reports when its signature is valid.
Accounting Manager reviews.
Open Online Payments to see the provider, its payment methods and each payment transaction.
Billing Clerk refunds.
Refund all or part of a payment from the customer payment. The refund shows MoMo's answer: done, still processing, or refused.
Key Features
MoMo provider credentials
Enter the MoMo partner code, access key and secret key that sign every exchange with MoMo.
Pay with MoMo at checkout
Pay an invoice or sales order in VND on MoMo's hosted page with a wallet, QR code, domestic ATM card or international card.
Signed payment confirmations
MoMo confirms, cancels or fails each payment automatically; a notification with a forged signature is refused without any change.
MoMo payment transactions
Check each MoMo payment by its reference, its status and the MoMo transaction id it was confirmed with.
Refund a MoMo payment
Refund all or part of a MoMo payment from the customer payment; a refund MoMo has not settled yet stays pending.
Refunds from Odoo
Send a refund to MoMo from Odoo and see MoMo's answer on the refund: done, still processing, or refused.
Who it is for
Owner or finance director
You want customers to pay with the wallet they already use, and successful transactions visible in one system.
Accounting manager
You review the provider, its payment methods and every payment by reference, status and MoMo transaction id.
Billing clerk
You refund from the customer payment and follow the refund until MoMo settles it.
IT administrator
You want confirmations you can trust. Forged signatures change nothing.
Best for: Vietnamese online shops and service providers that take VND payments from MoMo customers and want payments and refunds confirmed and tracked in Odoo.
Pay an invoice with MoMo
The customer picks MoMo on the invoice and pays in VND on MoMo's page.
Set up the provider
Enable MoMo in Test Mode or Enabled, and choose the payment methods.
Enter your MoMo credentials
Partner code, access key and secret key are entered in one place.
MoMo ready in Payment Providers
See at a glance that MoMo is enabled and published for your company.
Questions buyers ask
Can a forged notification mark an order paid?
No. A notification with a forged signature is refused without any change.
Can I refund from Odoo?
Yes, all or part of a payment. Whether each payment method supports refunds is shown in the Payment Methods list. A refund MoMo answers as still processing stays pending: check its outcome in the MoMo portal.
Is there a limit per payment?
Yes. MoMo accepts up to 50,000,000 VND per payment. If you want, set the Maximum Amount on the provider, in your company currency, so that MoMo is not offered above it.
Which ways can customers pay?
MoMo wallet or QR code, domestic ATM card, and international cards.
Which currency does it support?
VND, for customers in Vietnam. For invoices or orders in another currency, the administrator can set the provider's Default Converted Currency to VND so the customer is charged in VND; this uses the currency conversion setup of the required Currency Conversion Difference module.
Need help with MoMo Payment Provider?
Pre-Sales & Partnership
sales@viindoo.comTechnical Support
apps.support@viindoo.comTechnical Requirement
- Odoo version: 19.0
- Editions: Odoo Community, Odoo Enterprise
- Required modules: payment (Odoo core), Currency Conversion Difference (to_currency_conversion_diff)
- License: OPL-1
MoMo Payment Provider
Let your Vietnamese customers pay invoices and online orders in Vietnam Dong (VND) with MoMo. Customers choose the MoMo wallet, a Napas domestic card or an international card on MoMo's own secure page. Odoo records each payment automatically as soon as MoMo confirms it, and your billing team can refund it from Odoo.
Overview
The problem it solves. Collecting payments by bank transfer or by hand means chasing customers, matching amounts and re-typing receipts. With MoMo, the customer pays online from the invoice or the shopping cart, MoMo confirms the payment to Odoo with a signed message, and Odoo marks the payment as confirmed without any manual entry.
How a payment moves.
- Customer - opens an invoice or sales order in the customer portal, clicks Pay Now, selects MoMo and is sent to MoMo's page. The payment is Draft, then Pending while the customer pays.
- MoMo and Odoo (automatic) - MoMo confirms the result. The payment becomes Confirmed when it succeeds, Canceled when the customer or MoMo cancels or lets it expire, or Error when MoMo refuses or fails it. A payment that MoMo holds for review stays Pending until MoMo reports the outcome.
- Billing Clerk - refunds a confirmed payment, fully or partly, from the customer payment in Odoo and follows the refund until MoMo completes it.
- Accounting Manager - reviews the provider, its payment methods and the payment transactions.
- System Administrator - sets the provider up once, with the keys issued by MoMo.
Who uses this module
| Role | What they do | Access right to assign |
|---|---|---|
| System Administrator | Installs the module, enters the MoMo Partner Code, Access Key and Secret Key, and enables the provider. | Role / Administrator |
| Accounting Manager | Reviews the MoMo payment provider, its payment methods and the payment transactions. | Accounting / Administrator |
| Billing Clerk | Refunds a MoMo payment, fully or partly, and follows its refunds. | Accounting / Invoicing |
| Customer | Pays an invoice or sales order online in VND with MoMo. | Portal or website visitor (no access right to assign) |
The Accounting / Administrator right includes everything the Accounting / Invoicing right allows.
Limits to know. MoMo charges Vietnam Dong only, and the provider offers MoMo only to customers in Vietnam. MoMo itself refuses a single payment above 50,000,000 VND. To stop offering MoMo above an amount, set the provider's Maximum Amount (see below). By default, a document in another currency does not show MoMo (see the FAQ for the administrator option).
Setup (for the System Administrator)
Installation
- Open Apps.
- Remove the default filter and search for MoMo Payment Provider.
- Click Install. The apps it requires, Payment Engine and Payment Gateway Currency Conversion, are installed with it.
Get your keys from MoMo
Before you configure Odoo, register a business account on the MoMo business portal (see MoMo for Developers). MoMo gives you three values for each environment: the Partner Code, the Access Key and the Secret Key. The test (sandbox) environment and the production environment have different values. Keep the Secret Key private: anyone who has it can sign messages as your business.
Configure the provider
- Open Invoicing ‣ Configuration ‣ Online Payments ‣ Payment Providers and open MoMo. The list shows one card per provider, with its mode and whether it is published.
- On the Credentials tab, fill in MoMo Partner Code, MoMo Access Key and MoMo Secret Key with the values from the MoMo portal. The Access Key and the Secret Key are hidden as you type.
- Choose the State:
- Test Mode - Odoo talks to MoMo's sandbox. Use the sandbox keys and test accounts; no real money moves. A Test Mode ribbon is shown on the form and a warning icon appears next to the payment methods at checkout.
- Enabled - Odoo talks to MoMo's production system. Use the production keys; customers are charged for real.
- Disabled - MoMo is not offered to anyone.
- On the Configuration tab, check the Payment Methods (MoMo, Napas Card and Card are selected for you) and the availability fields: Currencies (VND) and Countries (Vietnam). Maximum Amount is empty: if you want MoMo not to be offered above MoMo's own limit of 50,000,000 VND, enter that limit in your company currency. Click Enable Payment Methods if you want to review the methods in detail.
- Make sure the provider is published: click the Unpublished button at the top so that it shows Published. An unpublished provider is not offered to customers.
- Save.
The three keys are visible and editable only for System Administrators. Other users who open the provider do not see them, and the keys are not copied when the provider is duplicated.
Do not switch to Enabled until you have tested a payment in Test Mode with the sandbox keys, then replaced all three keys with the production ones.
Notification and return addresses
Odoo sends MoMo the two addresses it needs with every payment, built from your website address (the Web Base URL system parameter):
- Notification address (IPN): https://<your-domain>/payment/momo/webhook - MoMo calls it to tell Odoo the result of a payment.
- Return address: https://<your-domain>/payment/momo/return - MoMo sends the customer back here after paying or cancelling.
Your domain must be reachable from the internet over HTTPS, otherwise MoMo cannot deliver the confirmation. If the MoMo portal asks you to register a notification address for your account, enter the first address above.
Assign the access rights
Open Settings ‣ Users & Companies ‣ Users, open each user and, in the Accounting line, choose Invoicing for billing clerks or Administrator for accounting managers.
Payment methods
MoMo offers three payment methods, all shown on the customer's checkout:
| Payment method | What the customer uses | Refunds |
|---|---|---|
| MoMo | The MoMo wallet (QR code or the MoMo app). | Full or partial |
| Napas Card | A Vietnamese domestic ATM card. | Full amount only |
| Card | An international card (Visa, Mastercard or JCB). | Full or partial |
The customer picks the exact way to pay on MoMo's page, and Odoo records the payment under the method actually used. To hide one of these methods, remove it from Payment Methods on the provider's Configuration tab.
Customer: pay with MoMo
This chapter describes what your customer does. They need a portal link to the invoice or sales order, or they shop on your website.
- The customer opens the invoice or order from the link in your email or from their portal, and clicks Pay Now.
- In the Payment method list, they select MoMo, Napas Card or Card. Only the methods available for the amount, currency and country of the document are listed.
- They click Pay. Odoo creates the payment with MoMo and redirects the customer to MoMo's secure page.
- On MoMo's page they choose how to pay (scan the QR code with the MoMo app, or enter card details) and confirm.
- MoMo sends the customer back to your site, which shows the payment status page. The invoice is marked as paid once the payment is confirmed.
If the customer closes the MoMo page without paying, the payment stays unpaid and they can start again from the same invoice.
How payments are confirmed
You never confirm a MoMo payment by hand. Two safeguards decide the result:
- Signed notification. MoMo sends a notification signed with your Secret Key. Odoo checks the signature and the Partner Code before it changes anything. A notification that does not match is refused and has no effect.
- Return page check. When the customer comes back to your site, Odoo does not trust the information in the browser. It asks MoMo directly for the payment status, and only then updates the payment.
MoMo reports a result code for each payment. Odoo turns it into one of four outcomes:
| Outcome | Meaning |
|---|---|
| Confirmed | MoMo reports success. The payment is recorded and the invoice is paid. |
| Pending | The payment is initiated, being processed or held by MoMo for review. MoMo's message is kept on the payment. It stays pending until MoMo reports the final result. |
| Canceled | The customer cancelled, the payment expired, or MoMo declined it. |
| Error | MoMo refused or failed the payment (for example insufficient balance, invalid account or a rejected request). The reason from MoMo is kept on the payment. |
To review the payments, open Invoicing ‣ Configuration ‣ Online Payments ‣ Payment Transactions. This menu is only visible in developer mode: activate developer mode first (add ?debug=1 to the address of your Odoo page, or use the developer mode link in Settings). Use the filters and search box to find a payment by reference, customer or status.
Billing Clerk: refund a payment
You can refund a confirmed MoMo payment without leaving Odoo.
- Open Invoicing ‣ Customers ‣ Payments and open the payment made with MoMo.
- Click Refund. The window shows the amount already refunded and the amount still available.
- Enter the Refund Amount:
- For MoMo and Card payments you may refund part of the payment or all of it, and you can refund several times until the full amount is returned.
- For Napas Card payments only the full amount can be refunded.
- Confirm. Odoo sends the request to MoMo.
- If MoMo completes the refund at once, it appears as done. If MoMo answers that it is still processing, the refund stays Pending: MoMo sends no notification about refunds, so Odoo does not update it afterwards. Check its outcome in the MoMo portal.
- Click the Refunds smart button on the payment to follow its refunds.
The refund is paid back to the customer by MoMo in VND, up to the amount of the original payment. If MoMo refuses a refund, the refund shows an Error with MoMo's message. If Odoo does not know the MoMo transaction number of a payment, it asks you to refund it from the MoMo portal instead.
Accounting Manager: review
- Payment Providers: check the state (Test Mode or Enabled), whether MoMo is published, the maximum amount, currency and countries.
- Payment Methods: check which methods are active.
- Payment Transactions (developer mode): follow every MoMo payment and refund, with its reference, amount, state and MoMo's message.
Troubleshooting
| Problem | What to do |
|---|---|
| MoMo is not offered at checkout | Check that the provider is Enabled or in Test Mode, Published, that the document is in VND, that the amount does not exceed the provider's Maximum Amount if one is set, and that the customer's country is Vietnam. On the customer portal, an administrator can open Show availability report in the Pay window to see the reason. |
| The customer paid but the invoice is still unpaid | Wait a few minutes: the payment may be pending. Check the status in the payment transaction. If the transaction stays pending, check the MoMo portal; if MoMo reports it as successful, make sure your website address is reachable over HTTPS so that MoMo's notification can arrive. |
| Pending with a message from MoMo | MoMo is holding or still processing the payment. Odoo keeps it pending until MoMo reports the final result. Resolve it from the MoMo portal if it does not move. |
| Error "MoMo refused to create the payment" | Check the Partner Code, Access Key and Secret Key and that they belong to the environment selected in State (sandbox keys in Test Mode, production keys in Enabled). |
| A refund stays pending | MoMo answered that it was still processing the refund and sends no notification about refunds. Check the refund in the MoMo portal. |
| The Refund button is missing | The payment is fully refunded, or it was not made with MoMo. Napas Card payments can be refunded in full only. |
| The keys are not visible | Only System Administrators can see them. |
FAQ
Can customers pay in another currency such as USD?
Not by default. MoMo charges VND only. An administrator can set Default Converted Currency to VND on the provider's Configuration tab; once the Payment Gateway Currency Conversion setup is complete, a document in another currency is then charged to the customer in VND converted from the document currency.
What is the largest amount a customer can pay?
MoMo accepts up to 50,000,000 VND per payment and refuses a larger payment, which then shows an Error with MoMo's message. Odoo does not set a limit by default: to stop offering MoMo above an amount, fill in the Maximum Amount field on the provider's Configuration tab, in your company currency.
Can I use MoMo for a test without a MoMo business account?
No. You need the sandbox keys that MoMo issues to your business account.
Who can see the keys?
Only System Administrators. The keys are also hidden from logs and are not copied when a provider is duplicated.
This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file).
You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software.
The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.