MoMo Wallet

Overview

MoMo Wallet is a payment method to process payments and payouts by using MoMo e-wallet. It is a e-wallet in Vietnam with 70% of the market share and around 5 million active users. MoMo Wallet accounts are linked to mobile phone numbers of the users. Funds can be added to the MoMo Wallet accounts by using bank transfers or credit cards, as well as by cash at MoMo stores across Vietnam. Purchases can be processed by using Payment Page and Gate. Payouts can be processed by using Gate and Dashboard.

Download the logo in vector format here.

Payment method type e-wallet payments
Countries and regions Viet Nam
Payment currencies VND
Currency conversion On the Monetix side
Purchases
Payouts
COF payments
Full refunds
Partial refunds
Chargebacks
Special considerations
  • the amounts for VND currency are specified in the major currency units (without any fractional part).
  • when making a purchase the customer can specify an amount different from the one specified in the request. In this case, the payment is assigned an intermediate status and the Monetix technical support specialists contact the merchant to make a refund to the customer. Processing of such refund can take up to 48 hours
  • the lifetime of the qr code on the provider side is 10 minutes
Onboarding and access fee refer to your Monetix key account manager

Interaction diagram

Payment and payout processing by using the MoMo Wallet payment method requires merchant's web service, one of Monetix interfaces, and the Monetix payment platform, as well as the technical facilities of provider.

Operations support

Interfaces Amounts, VND Times
Payment Page Gate Dashboard minimum maximum basic threshold
Purchases 100,000 20,000,000 3 minutes 30 minutes
Payouts 50,000 20,000,000 2 minutes *

* Refer to your Monetix Key Account Manager for the information.

You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section and click the Payment methods tab.

Processing scenarios

In the MoMo Wallet method, purchases and payouts follow different processing procedures. To perform a purchase operation, you need to redirect customer to the provider service.

The sections that follow provide detailed information about what you need to perform payments and how you can analyze the information on payments and operations.

Purchase by using Payment Page

General information

In the MoMo Wallet method, when processing a purchase by using Payment Page, the merchant web service should send a request with all the required parameters and signature to the Monetix URL and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the MoMo Wallet method selected. For more information about preselecting payment methods, see in Preselecting payment methods. The full sequence and particularities of the purchase process are provided below.

Figure 4. Purchase by using Payment Page
  1. A customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the specified Monetix URL.
  3. The request for opening is redirected to the payment platform.
  4. The payment platform performs the initial request processing that involves validation of the required parameters and signature.
  5. Requested Payment Page is generated into the Monetix payment platform as specified in the project settings and the request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the MoMo Wallet method.
  8. The payment platform receives the purchase request for payment processing from Payment Page.
  9. The payment platform performs the internal purchase request processing and sends it to the provider service.
  10. The purchase request is processed on the provider service side.
  11. The provider service generates the data for redirecting the customer to its website form and sends it to the payment platform.
  12. The payment platform sends the customer redirection data to Payment Page.
  13. The customer is redirected to the provider website.
  14. The customer completes all the payment steps required.
  15. The payment is processed on the provider side.
  16. The result is displayed to the customer on the provider website.
  17. The customer is redirected to Payment Page.
  18. The provider service sends the result notification to the payment platform.
  19. The payment platform sends a callback with the payment result to the web service.
  20. The payment platform sends the result to Payment Page.
  21. A page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the MoMo Wallet payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.

Request format

There are several things you need to consider when using the MoMo Wallet method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
    • project_id—project ID you obtained from Monetix
    • payment_id—payment ID unique within the project
    • customer_id—the unique ID of the customer within your project
    • customer_email—customer email
    • customer_first_name—customer first name
    • customer_last_name—customer last name
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—purchase amount in major currency units without any fractional part.

      If the currency does have minor units (that is, the number of digits for minor currency units is not zero), then you must set this parameter to the amount in minor currency units without any decimal point or comma . For the information on whether the currency has any minor units, see Currency codes.

  2. If you need to have payment form displayed with the MoMo Wallet method selected, set the force_payment_method parameter to momopay.
  3. If required, you can also add any other additional parameters Payment Page supports.
  4. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.

Here is an example of data from a request for Payment Page opening:

EPayWidget.run(
    {
        project_id: 1234,
        payment_id: 'payment_47',
        customer_id: 'customer_123',
        customer_first_name: 'John',
        customer_last_name: 'Doe',
        customer_email: 'johndoe@example.com',
        payment_currency: 'VND',
        payment_amount: 100000,    
        signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

For information about all parameters available in the MoMo Wallet method, see Payment Page invocation parameters.

Callback format

The MoMo Wallet method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Payment Page.

The following is the example of a callback with an information about successful 110,000 VND purchase made in the 1926 project.

Figure 5. Example of a successful purchase callback
{
        "project_id": 1926,
        "payment": {
            "id": "1053",
            "type": "purchase",
            "status": "success",
            "date": "2021-03-12T08:34:25+0000",
            "method": "momopay",
            "sum": {
                "amount": 110000,
                "currency": "VND"
            },
            "description": ""
        },
        "operation": {
            "id": 18,
            "type": "sale",
            "status": "success",
            "date": "2021-03-12T08:34:25+0000",
            "created_date": "2021-03-12T08:34:12+0000",
            "request_id": "48be0494d37ab7106325f4eb16597a0d0-00000001",
            "sum_initial": {
                "amount": 110000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 110000,
                "currency": "VND"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 2892,
                "payment_id": "1615538057957",
                "auth_code": ""
            }
        },
        "signature": "KMCoAR2yCd70I8VoAVT3NSF98zwoMfcDx2zwLixVsMW/Cvonik4A=="
    }

The following is the example of a callback for a declined purchase.

Figure 6. Example of a declined purchase callback
{
        "project_id": 1926,
        "payment": {
            "id": "XPAY_1054",
            "type": "purchase",
            "status": "decline",
            "date": "2021-03-12T08:38:57+0000",
            "method": "momopay",
            "sum": {
                "amount": 110000,
                "currency": "VND"
            },
            "description": ""
        },
        "operation": {
            "id": 19,
            "type": "sale",
            "status": "decline",
            "date": "2021-03-12T08:38:57+0000",
            "created_date": "2021-03-12T08:38:48+0000",
            "request_id": "8df6a94820540aa079d3c4643f2fa329a9ec78a-00000001",
            "sum_initial": {
                "amount": 110000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 110000,
                "currency": "VND"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 2892,
                "payment_id": "1615538332499",
                "auth_code": ""
            }
        },
        "signature": "u1YtNglF6H64ZWDiW+8D6K56/WmDUT6AySz0PF0wQvBMhuTsWrODsc32g=="
    }

Related topics

The following topics might be useful when implementing payments by using Payment Page:

Purchase by using Gate

General information

In the MoMo Wallet method, when processing a purchase by using Gate, the merchant web service is required to do the following:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Perform the redirection of a customer to the provider service.
  3. Get the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.

Figure 7. Purchase by using Gate
  1. A customer initiates a purchase through MoMo Wallet on the merchant's web service side.
  2. The web service sends the request for processing the purchase by using Gate to the specified Monetix URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation of the required parameters and signature.
  5. The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response structure.
  6. The payment platform performs the internal payment request processing and redirects the request to the provider service.
  7. The request is processed on the provider side.
  8. The provider service sends the data for redirecting the customer to the provider service to the payment platform.
  9. The payment platform sends the callback with the redirection data in the redirect_data object to the web service.
  10. The customer is redirected from the web service to the provider service.
  11. The customer completes all the payment steps required.
  12. The payment is processed on the provider side.
  13. The result is displayed to the customer.
  14. The customer is redirected to the merchant's web service.
  15. The provider service sends the payment result notification to the payment platform.
  16. The payment platform sends a callback to the web service.
  17. The customer receives the payment result on the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the MoMo Wallet payment method and provide the information on the format of callbacks with purchase results.

Request format

There are several things you must consider when using purchase requests in the MoMo Wallet method:
  1. You perform purchases by sending the /v2/payment/wallet/momopay/sale request by using POST (HTTP) method. This is an e-wallet payments request group: /v2/payment/wallet/{payment_method}/sale.
  2. The following objects and parameters must be specified in any request:
    • general—object with general request identification information:
      • project_id—the project ID you obtained from Monetix
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—IP address of the customer's device
      • email—customer email
      • first_name—customer first name
      • last_name—customer last name
    • payment—object with purchase information:
      • amount—purchase amount in major currency units without any fractional part.

        If the currency does have minor units (that is, the number of digits for minor currency units is not zero), then you must set this parameter to the amount in minor currency units without any decimal point or comma . For the information on whether the currency has any minor units, see Currency codes.

      • currency—code of purchase currency in the ISO-4217 alpha-3 format
  3. The following parameters with the return URLs are optional, but we strongly advise you to specify them in the request to provide your customer a better user experience. If you don't specify any parameters of the return_url object in the request, by default Gate will redirect the customer to the URL specified in your project in Monetix.
    • return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
      • success—the URL to redirect the customer to after the payment is successfully completed
      • decline—the URL to redirect the customer to after the payment is declined
      • return—the URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the success and decline parameters are not specified in the request.
  4. If required, you can also add any other additional parameters Gate supports.

Here is an example of data from a purchase request in the MoMo Wallet method.

Figure 8. Example of data from a purchase request
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "payment": {
        "amount": 200000,
        "currency": "VND"
    },
    "return_url": {
        "success": "https://example.com/success/",
        "decline": "https://example.com/decline/",
        "return": "https://example.com/return/"
    }
}

Format of customer redirection data

After receiving and processing your purchase request, the payment platform sends a callback to your web service containing the data to redirect the customer to the provider service.

To redirect the customer, use the values of the following parameters in the redirect_data object:

  • url—the URL to redirect the customer to
  • body—the data to be sent in the request body
  • method—the HTTP method to get an HTML page of the website (for example, POST or GET)
  • encrypted—this is the service parameter. Ignore the data it contains.

Here is an example of a piece of callback containing the data to redirect the customer.

"redirect_data": {
    "method": "POST",
    "body": {
        "example_parameter_1": "value_1",
        "example_parameter_2": "value_2"
    },
    "encrypted": [],
    "url": "https://example.com/redirect"
}

Callback format

The MoMo Wallet method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Gate.

The following is the example of a callback with an information about successful 110,000 VND purchase made in the 1926 project.

Figure 9. Example of a successful purchase callback
{
        "project_id": 1926,
        "payment": {
            "id": "1053",
            "type": "purchase",
            "status": "success",
            "date": "2021-03-12T08:34:25+0000",
            "method": "momopay",
            "sum": {
                "amount": 110000,
                "currency": "VND"
            },
            "description": ""
        },
        "operation": {
            "id": 18,
            "type": "sale",
            "status": "success",
            "date": "2021-03-12T08:34:25+0000",
            "created_date": "2021-03-12T08:34:12+0000",
            "request_id": "48be0494d37ab7106325f4eb16597a0d0-00000001",
            "sum_initial": {
                "amount": 110000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 110000,
                "currency": "VND"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 2892,
                "payment_id": "1615538057957",
                "auth_code": ""
            }
        },
        "signature": "KMCoAR2yCd70I8VoAVT3NSF98zwoMfcDx2zwLixVsMW/Cvonik4A=="
    }

The following is the example of a callback for a declined purchase.

Figure 10. Example of a declined purchase callback
{
        "project_id": 1926,
        "payment": {
            "id": "XPAY_1054",
            "type": "purchase",
            "status": "decline",
            "date": "2021-03-12T08:38:57+0000",
            "method": "momopay",
            "sum": {
                "amount": 110000,
                "currency": "VND"
            },
            "description": ""
        },
        "operation": {
            "id": 19,
            "type": "sale",
            "status": "decline",
            "date": "2021-03-12T08:38:57+0000",
            "created_date": "2021-03-12T08:38:48+0000",
            "request_id": "8df6a94820540aa079d3c4643f2fa329a9ec78a-00000001",
            "sum_initial": {
                "amount": 110000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 110000,
                "currency": "VND"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 2892,
                "payment_id": "1615538332499",
                "auth_code": ""
            }
        },
        "signature": "u1YtNglF6H64ZWDiW+8D6K56/WmDUT6AySz0PF0wQvBMhuTsWrODsc32g=="
    }

Related topics

The following topics might be useful when implementing payments through Gate:

Payout by using Gate

General information

To perform a payout by using Gate with the MoMo Wallet payment method:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Accept a callback with the payout result from the payment platform.

The following picture provides the details of the payout processing flow in the MoMo Wallet payment method.

Figure 11. Payout processing flow when performing a payout by using Gate
  1. The customer initiates a payout in your system.
  2. Your system sends the payout request to Gate.
  3. The Monetix payment platform receives the request.
  4. The payment platform checks whether the request contains all the required parameters and correct signature.
  5. The payment platform sends you a response in which it acknowledges your request and provides the request validation result. (For more information about the response format, see Response structure.)
  6. The payment platform processes the request and forwards it to the provider service.
  7. The provider service processes this request.
  8. The provider service informs the payment platform about the payout result.
  9. The payment platform sends a callback with the payout result to your system.
  10. Your system sends the payout result to the customer.

Request

This section provides the instructions on how to build the payout request through Gate by using the MoMo Wallet payment method.

HTTP request method POST
Request body format JSON
API endpoint /v2/payment/wallet/momopay/payout
Full API endpoint specification /v2/payment/wallet/{payment_method}/payout
Table 1. Basic parameters of a payout request

strictly required—the parameter must be in the initial request.

✱—the parameter may not be required in some scenarios. Contact your account manager at Monetix for details.

Object Parameter Description

general
object
strictly required

project_id
integer
strictly required

Project ID you obtained from Monetix when integrating.

Example: 123

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

signature
string
strictly required

Signature created after you've specified all the request parameters. To learn about signature generation, see Signature generation and verification.

customer
object
strictly required

id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

ip_address
string
strictly required

IP address of the customer's device.

Example: 198.51.100.47

email
string
strictly required

Customer's email.

Example: johndoe@example.com

payment
object
strictly required

amount
integer
strictly required

Payout amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units. If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency codes.

Example: 110 000 VND must be sent as 110000

currency
string
strictly required

Code of the payout currency in the ISO-4217 alpha-3 format.

The currency of the payout can be only VND.

Example: VND

account
object
strictly required

number
string
strictly required

Customer's phone number that is linked to the MoMo Wallet. It must consist of 10 digits, without special characters and country code.

Example: 1234567890

customer_name
string
strictly required

Customer's full name.

Example: John Doe

You can also add any other optional parameters to the payout request, if necessary. For the list of all the parameters available in Gate, see API Reference.

Here is an example of the data from a request to initiate a payout with the MoMo Wallet payment method.

Figure 12. Example of payout request body
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "email": "johndoe@example.com"
    "account":  {
        "number": "1234567890",
        "customer_name": "John Doe" 
    },
    "payment": {
        "amount": 110000,
        "currency": "VND"
    }
}

Callback

In the MoMo Wallet payment method, the payment platform returns the payout result in a callback. For the information about the callback structure, see Callbacks in Gate.

The following is an example of a callback body with the information about a successfully completed payout.

Figure 13. Example of the data from a successful payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_48",
        "type": "payout",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "momopay",
        "sum": {
            "amount": 110000,
            "currency": "VND"
        },
        "description": ""
    },
    "account": {
        "number": "1234567890",
        "customer_name": "John Doe"
    },
    "operation": {
        "id": 29,
        "type": "payout",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 110000,
            "currency": "VND"
        },
        "sum_converted": {
            "amount": 110000,
            "currency": "VND"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined payout.

Figure 14. Example of the data from a declined payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_48",
        "type": "payout",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "momopay",
        "sum": {
            "amount": 110000,
            "currency": "VND"
        },
        "description": ""
    },
    "account": {
        "number": "1234567890",
        "customer_name": "John Doe"
    },
    "operation": {
        "id": 29,
        "type": "payout",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 110000,
            "currency": "VND"
        },
        "sum_converted": {
            "amount": 110000,
            "currency": "VND"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlf155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

Payout by using Dashboard

To make a payout through Dashboard, the merchant sends a request and receives a notification with the request processing result. There are two ways to initiate payouts through Dashboard:
  • single payout—you specify the currency and amount for a payout available for this method and fill in all the fields required for the selected payment method on the Dashboard pages.
  • as a part of a mass payment—all the parameters are specified in a CSV file. Refer to the Payouts by using Gate section for the parameters required by your payment method.

Information about completed payouts is available for viewing in the Payments and Manual Payments sections of Dashboard.

For more information about payout processing by using Dashboard, see Performing payouts.

Testing

General information

You can perform test purchases with the MoMo Wallet payment method by using Payment Page and Gate.

To perform test purchases, you'll need the test project ID and the secret key to it. To get them, contact the technical support team at support@monetix.pro.

When performing test payments, keep in mind that:

  • your requests must contain the test project ID
  • the payment currency that you send in requests can be only VND
  • random values may be used as the payment ID and in the parameters with customer information
  • the interface of the test checkout page may be different from the production one.

Test payments statuses

To receive one of the following statuses in the callback with the test purchase result, use a particular value for the purchase amount in the request:

  • decline—when using 400 or 404 amount
  • success—when using any amount other than those mentioned above

Testing purchase by using Payment Page

To perform a test purchase by using Payment Page:

  1. Send a request for purchase through Payment Page to the payment platform.
  2. Choose a payment method on the test checkout page. If you've passed the force_payment_method parameter with the momopay value in the request, you won't have to choose the payment method.
  3. Click the Success or Decline button (the relevant button will be displayed depending on the amount sent in the request).
  4. Accept a callback with information about the test purchase result.
  5. Wait a few seconds until the result of the test purchase is displayed to you on the test checkout page.

See the detailed information about purchase processing through Payment Page in the MoMo Wallet payment method in the Purchase by using Payment Page section.

Testing purchase by using Gate

To perform a test purchase by using Gate:

  1. Send a request for performing a test purchase to the payment platform.
  2. Accept a callback with redirection data.
  3. Go to the received URL and click the Success or Decline button (the relevant button will be displayed depending on the amount sent in the request).
  4. Make sure that the test purchase confirmation page is displayed to you.
  5. Accept a callback with information about the test payment result.

See the detailed information about purchase processing through Gate in the MoMo Wallet payment method in the Purchase by using Gate section.

Analysis of payments results

As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.

You can load and analyze all the necessary information in Dashboard (dash-light.trxhost.com), for instance you can use the analytic panels in the Analytics section for this purpose.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard allows you to download reports in CSV format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by means of sending requests to the /operations/get endpoint.

If you have any further questions regarding payment data analysis, contact Monetix technical support.