One-Time (Non-Recurring) Checkout Payments with MoMo E-Wallet are supported on various platforms:
- Desktop websites
- Mobile websites
- Mobile apps
- Devices that do not support internet browser
The instructions below show how you can process accordingly for each platform type and how API Configurations operate.
Process Flow
API Configuration
HTTP Information
Initiate payment method
On the merchant’s payment page, after customers choose to pay with MoMo e-wallet, merchant server needs to call MoMo’s API captureWallet to get payment methods and then apply suitable ones to their platforms.
HTTP Request
POST /v2/gateway/api/create
AttributeTypeRequiredDescriptionpartnerCodeStringIntegration informationsubPartnerCodeStringSub partner IdstoreNameStringPartner store namestoreIdStringStore IDrequestIdString(50)Request ID, unique for each request, MoMo’s partner uses the requestId field for idempotency controlamountLongAmount needs to be paidMin: 1.000 VND Max: 50.000.000 VND Currency: VND Data type: LongorderIdStringPartner Transaction IDRegex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$orderInfoStringOrder’s informationorderGroupIdLongThe orderGroupId will be provided by MoMo to classify groups of orders for further operational activities. Please contact MoMo to use this field.redirectUrlStringDefault value is empty “”A partner’s URL. This URL is used to redirect from MoMo page to partner’s page after customer’s payment. Support: AppLink and WebLinkipnUrlStringPartner API. Used by MoMo to submit payment results by IPN method (server-to-server) methodrequestTypeStringcaptureWalletextraDataStringDefault value is empty “” Encode base64 follow Jsonformat: {“key”: “value”} Example with data: {“username”: “momo”}=> data of extraData: eyJ1c2VybmFtZSI6ICJtb21vIn0=itemsListList of products displayed on the payment page. Maximum: 50 itemsdeliveryInfoObjectDelivery info of this orderuserInfoObjectInfo of the customerautoCaptureBooleanIf set to false, the payment will not be automatically captured.langStringLanguage of returned message (vi or en)signatureStringSignature to confirm information. Secure transaction in Hmac_SHA256 with format: a String sort all key name of data field from a-z: accessKey=$accessKey&amount=$amount&extraData=$extraData&ipnUrl=$ipnUrl&orderId=$orderId&orderInfo=$orderInfo&partnerCode=$partnerCode&redirectUrl=$redirectUrl&requestId=$requestId&requestType=$requestType
Details of an item
It is not required to add items. Howvever, each item added must have these fixed keys:
AttributeTypeRequiredDescriptionidStringThe Id of item.nameStringThe name of item.imageUrlStringLink image of productdescriptionStringThe description of item.categoryStringThe type of item.currencyStringVNDquantityIntegerQuantity number of each item. It must be greater than 0totalAmountLongprice x quantitypurchaseAmountLongThe amount need to be purchasedmanufacturerStringName of manufacturerunitStringThe units of measurement used for productstaxAmountLongTotal amount of tax
Example Item
Details of deliveryInfo
AttributeTypeRequiredDescriptiondeliveryAddressStringDelivery addressdeliveryFeeStringDelivery feequantityStringQuantity of product
Example deliveryInfo
Details of userInfo content
If this is provided, customer as MoMo user will be receive a notification or email (by choices).
AttributeTypeRequiredDescriptionnameStringName of the customer as registered on merchant sitephoneNumberStringPhone number of the customer as registered on merchant siteemailStringEmail address of the customer as registered on merchant site
Example UserInfo
Redirecting information (redirectUrl)
WebLink: Links to open website.
AppLink: Link to open mobile application.
Learn more about AppLink
- Android: https://developer.android.com/training/app-links
- IOS: https://developer.apple.com/documentation/uikit/core_app/..
Example Request
HTTP ResponseAttributeTypeRequiredDescriptionpartnerCodeStringIntegration informationrequestIdStringSame as the original requestorderIdStringPartner Transaction IDamountLongSame as the original payment amountresponseTimeLongTime to respond payment results to partner Format: timestampmessageStringError description, error language is based on langresultCodeintResult CodepayUrlStringURL for switching from the partner’s page to the MoMo payment pagedeeplinkStringURL to open MoMo application directly (Customers must install MoMo app first) and payment confirmation screen. If you have problem opening deeplink in android 11, please see the tutorialqrCodeUrlStringData to generate QR code if you want customers to scan the QR code directly on your purchase page or to print it on the invoice. Note: This URL is NOT containing the image of the QR code, you need to use an external library to generate the QR code.deeplinkMiniAppStringURL to open the MoMo app’s payment confirmation screen. Apply when partner’s website is embedded into MoMo app.signatureStringSignature to confirm information. Secure transaction in Hmac_SHA256 with format: accessKey=$accessKey&amount=$amount&message=$message&orderId=$orderId&partnerCode=$partnerCode&payUrl=&payUrl&requestId=$requestId&responseTime=$responseTime&resultCode=$resultCode
Example response
Payment
You need to install MoMo Test app and use MoMo TEST Account to process payment.
Payment guideline: Login > Home screen > Scan QR.
Processing payment result
For more information, see Payment Notification.
Parameter description
Description for parameters which are used by MoMo in the URL redirectUrl and the body content of ipnUrl.
AttributeTypeRequiredDescriptionpartnerCodeStringIntegration InformationorderIdStringPartner Transaction IDrequestIdStringPartner’s requestIdamountLongPayment amountpartnerUserIdStringMoMo’s unique identifier for each MoMo eWallet account.orderInfoStringOrder’s informationorderTypeStringmomo_wallettransIdLongMoMo’s transaction IDresultCodeIntegerTransaction status of the order Result CodemessageStringError description, languague is based on langpayTypeStringPayment type: webApp, app,qror miniappresponseTimeLongTime to respond payment results to partner Format: timestampextraDataStringExtra Data. Default: “”signatureStringSignature to confirm information. Secure transaction in Hmac_SHA256 algorithm with format: a String sort all key name of data field from a-z: accessKey=$accessKey&amount=$amount&extraData=$extraData&message=$message&orderId=$orderId&orderInfo=$orderInfo&orderType=$orderType&partnerCode=$partnerCode&payType=$payType&requestId=$requestId&responseTime=$responseTime&resultCode=$resultCode&transId=$transId
See also
- Check Transaction Status
- Reverse & Refund
- Confirm Payment