Payment-method icon

MoMo for API only

Add MoMo to your API-only integration.

You can add MoMo to your existing integration. The following instructions show only what you must add to your integration specifically for MoMo.

If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.

Requirements

Requirement Description
Integration type Make sure that you have an existing API-only integration.
Redirect handling Make sure that your existing integration is set up to handle the redirect.
action.type: redirect.
Setup steps Before you begin, add MoMo in your Customer Area.

How it works

  1. The shopper selects MoMo as the payment method.
  2. The shopper enters their details in the payment form that you build.
  3. When you make the payment request, you include additional information about the items that the shopper intends to purchase, if applicable.
  4. You fulfill the order by sending items to the shopper.

Build your payment form

Include MoMo in the list of available payment methods. You do not need to collect any information from the shopper in your payment form.

You can download the logo for MoMo to use in your form.

Get MoMo as an available payment method

When you make the /paymentMethods to get available payment methods, specify the following so that MoMo is included in the response.

Parameter Values
countryCode VN
amount.currency VND
amount.value The value of the payment.
channel Specify for example Web, iOS, or Android.

Add additional parameters to your /payments request

You do not need to add any parameters when you make a payment.

Recurring payments

MoMo supports recurring transactions. To make recurring transactions, you need to:
  1. Create a shopper token.
  2. Use the token to make future payments for the shopper.

Create a token

To create a token, include in your /payments request:

  • storePaymentMethod: true
  • shopperReference: Your unique identifier for the shopper.

When the payment has been settled, you receive a recurring.token.created webhook containing:

  • type: recurring.token.created
  • shopperReference: your unique identifier for the shopper.
  • eventId: the pspReference of the initial payment.
  • storedPaymentMethodId: the token that you need to make recurring payments for this shopper.

Make sure that your server is able to receive the Recurring tokens life cycle events webhook. You can set up this webhook in your Customer Area.

Make a payment with a token

To make a payment with the token, include in your /payments request:

  • paymentMethod.storedPaymentMethodId: The storedPaymentMethodId from the recurring.token.created webhook.

    You can also get this value using the /listRecurringDetails endpoint.

  • shopperReference: the unique shopper identifier that you specified when creating the token.

  • shopperInteractionContAuth

  • recurringProcessingModel: Use Subscription for a series of transactions following a fixed time interval or UnscheduledCardOnFile for contracts with non-fixed time interval.

Test and go live

To make MoMo payments in the test environment:

  1. Download the MoMo test app for iOS or Android at https://test-payment.momo.vn/download/. If you are testing on a mobile browser, you see a link to download the test app. If you are testing on a desktop browser, use the test app to scan the QR code.
  2. Use MoMo's test credentials to log in to the test app. MoMo provides different credentials depending on the scenario that you want to test (for example, failed scenarios).

Check the status of MoMo test payments in your Customer Area > Transactions > Payments.

Before you can accept live MoMo payments, you need to submit a request for MoMo in your live Customer Area.

See also