Skip to main content

One-Time Payments

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

One-Time (Non-Recurring) Checkout Payments with Mobile Banking App are supported on various platforms:

  • Desktop websites
  • 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

Onetime_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.

requestType: Identify the type of the request

HTTP Request

POST /v2/gateway/api/create

AttributeTypeRequiredDescription
partnerCodeStringIntegration information
subPartnerCodeStringSub partner Id
storeNameStringPartner store name
storeIdStringStore ID
requestIdString(50)Request ID, unique for each request,
MoMo's partner uses the requestId field for idempotency control
amountLongAmount needs to be paid
Min: 1.000 VND
Max: 50.000.000 VND
Currency: VND
Data type: Long
orderIdStringPartner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$
orderInfoStringOrder's information
orderGroupIdLongThe 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 WebLink
ipnUrlStringPartner API. Used by MoMo to submit payment results by IPN method (server-to-server) method
requestTypeStringcaptureWallet
extraDataStringDefault 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 items
deliveryInfoObjectDelivery info of this order
userInfoObjectInfo of the customer
referenceIdStringPartner sub-reference code
For example, used in cases like customer code, household code, invoice code, subscriber code, etc.
autoCaptureBooleanIf 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:

AttributeTypeRequiredDescription
idStringThe Id of item.
nameStringThe name of item.
imageUrlStringLink image of product
descriptionStringThe description of item.
categoryStringThe type of item.
currencyStringVND
quantityIntegerQuantity number of each item. It must be greater than 0
totalAmountLongprice x quantity
purchaseAmountLongThe amount need to be purchased
manufacturerStringName of manufacturer
unitStringThe units of measurement used for products
taxAmountLongTotal amount of tax

Example Item

{
"id": "204727",
"name": "YOMOST Bac Ha&Viet Quat 170ml",
"description": "YOMOST Sua Chua Uong Bac Ha&Viet Quat 170ml/1 Hop",
"category": "beverage",
"imageUrl":"https://momo.vn/uploads/product1.jpg",
"manufacturer":"Vinamilk",
"price": 11000,
"quantity": 5,
"unit":"hộp",
"totalPrice": 55000,
"taxAmount":"200"
}
Details of deliveryInfo
AttributeTypeRequiredDescription
deliveryAddressStringDelivery address
deliveryFeeStringDelivery fee
quantityStringQuantity of product

Example deliveryInfo

{
"deliveryAddress": "Phu My Hung Tower",
"deliveryFee": "30000",
"quantity": "2"
}
Details of userInfo content

If this is provided, customer as MoMo user will be receive a notification or email (by choices).

AttributeTypeRequiredDescription
nameStringName of the customer as registered on merchant site
phoneNumberStringPhone number of the customer as registered on merchant site
emailStringEmail address of the customer as registered on merchant site

Example UserInfo

{
"name": "Nguyen Van A",
"phoneNumber": "0999888999",
"email": "email_add@domain.com"
}

Redirecting information (redirectUrl)

WebLink: Links to open website.

AppLink: Link to open mobile application.

Learn more about AppLink

Example Request

{
"partnerCode": "MOMO",
"partnerName" : "Test",
"storeId" : "MoMoTestStore",
"requestType": "captureWallet",
"ipnUrl": "https://momo.vn",
"redirectUrl": "https://momo.vn",
"orderId": "MM1540456472575",
"amount": 150000,
"lang": "vi",
"orderInfo": "SDK team.",
"requestId": "MM1540456472575",
"extraData": "eyJ1c2VybmFtZSI6ICJtb21vIn0=",
"signature": "fd37abbee777e13eaa0d0690d184e4d7e2fb43977281ab0e20701721f07a0e07"
}
HTTP Response
AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringSame as the original request
orderIdStringPartner Transaction ID
amountLongSame as the original payment amount
responseTimeLongTime to respond payment results to partner
Format: timestamp
messageStringError description, error language is based on lang
resultCodeintResult Code
payUrlStringURL for switching from the partner's page to the MoMo payment page
deeplinkStringURL 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 tutorial
qrCodeUrlStringData 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

On the production environment: You need to request permission to use qrCodeUrl, deeplink,deeplinkMiniApp fields.

Example response

{
"partnerCode": "MOMO",
"requestId": "MM1540456472575",
"orderId": "MM1540456472575",
"amount": 150000,
"responseTime": 145256987,
"message": "Thành công",
"resultCode": 0,
"payUrl": "https://test-payment.momo.vn/v2/gateway/pay?t=TU9NT1NKSTEyMDE5MDgyM3wxNjEzNTMyMDk3OTIyOjAxMjM0NTY3Nzg=",
"deeplink": "momo://?action=payWithAppToken&amount=150000&fee=0&requestType=payment&orderLabel=M%C3%A3+%C4%91%C6%A1n+h%C3%A0ng&orderId=MM1540456472575&requestId=MM1540456472575&merchantnamelabel=Nh%C3%A0+cung+c%E1%BA%A5p&description=SDK+team.&partnerCode=MOMO&merchantcode=MOMO&language=vi&merchantname=MoMo+Payment&packageId=&extras=&extraData=email=abc@gmail.com&deeplinkCallback=https%3A%2F%2Ftest-payment.momo.vn%2Fgw_payment%2Fm2%3Fid%3DM7EWVy&callbackUrl=https%3A%2F%2Ftest-payment.momo.vn%2Fgw_payment%2Fm2%3Fid%3DM7EWVy&urlSubmitToken=https%3A%2F%2Ftest-payment.momo.vn%2Fgw_payment%2Fpayment_with_app%3FpartnerCode%3DMOMO%26accessKey%3DF8BBA842ECF85%26requestId%3DMM1540456472575%26orderId%3DMM1540456472575%26orderInfo%3DSDK%2Bteam.%26amount%3D150000%26signature%3Ddf2a347519abb91e9c1bd1bee80e675f4108cb6dbcac531979e805857293d486%26requestType%3DcaptureWallet%26payType%3Dapp-in-app&appScheme=",
"qrCodeUrl": "https://test-payment.momo.vn/gw_payment/s/zoVKZd"
}

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.

AttributeTypeRequiredDescription
partnerCodeStringIntegration Information
orderIdStringPartner Transaction ID
requestIdStringPartner's requestId
amountLongPayment amount
partnerUserIdStringMoMo's unique identifier for each MoMo eWallet account.
orderInfoStringOrder's information
orderTypeStringmomo_wallet
transIdLongMoMo's transaction ID
resultCodeIntegerTransaction status of the order Result Code
messageStringError description, languague is based on lang
payTypeStringPayment type: webApp, app,qror miniapp.
In case you are using AIO QR, payment type will be aio_qror banktransfer_qr.
responseTimeLongTime to respond payment results to partner
Format: timestamp
extraDataStringExtra 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
paymentOptionStringAccount/Card has been used to pay for the transaction: momo,pay_later

Result Codes & Messages

Kindly locate result codes and messages of One-time Payments in the comprehensive list of result codes provided here.

See also