Skip to main content

Collection Link

Process Flow

MOD_parcel

Explanation

  • Step 1: Customers check out the order after shopping in-store/online
  • Step 2: Merchant send request to MoMo for Collection Link (attach Merchant credential)
  • Step 3: MoMo authenticates through the merchant profile and generates a collection link and returns it to the merchant.
  • Step 4: There are 3 use cases:
    • Case 1: Merchant is an online sales channel, after receiving the link, the system will automatically navigate to MoMo's payment page
    • Case 2: Merchants are offline stores using POS machines, the system sends the link via Email/SMS of the buyer, then the buyer will open the link to go to the payment page of MoMo.
    • Case 3: Merchants are SaaS (Software as a Service) partners, they will send a direct link through the buyer's chat channel, then the buyer clicks the link to go to MoMo's payment page.
  • Step 5: Depending on the device, MoMo will display the corresponding web or mobile web interface.
  • Step 6: Customers check order information, then choose one of the following methods: pay by MoMo E-wallet, pay by ATM card or pay by Visa/Master/JCB card.
  • Step 7: Depending on the payment method chosen, proceeds accordingly:
    • 7.1. Redirect to QRC payment page: Display the interface depending on the device that the customer is using. In case the device is a desktop or tablet, the payment information and QRC image will be displayed. In case the device is mobile, only payment information** will be displayed, if the customer has installed the MoMo app, the system will recognize it and go straight to the next step.
    • 7.2. Redirect to ATM payment page: Display order information and ask user to enters ATM card information before paying. The customer check order information, enter card information and confirm payment. Depending on the customer's device, it can display a desktop or webview interface.
    • 7.3. Redirect to Visa/Master/JCB payment page: Display order information and ask user to enter international card information before paying. The customer check order information, enter card information and confirm payment. Depending on the customer's device, it can display a desktop or webview interface.
  • Step 8: After scanning the QRC on the desktop or opening it directly from Mobile, the customer is directed to a secure payment confirmation screen, then clicks 'Confirm payment'.
  • Step 9: MoMo's Payment Gateway processes the payment, then returns the payment transaction result to Merchant

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 payWithMethod 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
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
Note: The payment method for ATM cards and Credit cards is enabled for transactions with a minimum amount of 10,000 VND.
orderIdStringPartner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$
orderInfoStringOrder's information
redirectUrlStringA 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
requestTypeStringpayWithMethod
extraDataStringEncode base64 follow Jsonformat: {"key": "value"}
Example with data: {"email": "example@gmail.com"}=> data of extraData: eyJlbWFpbCI6ICJleGFtcGxlQGdtYWlsLmNvbSJ9
itemsListList of products displayed on the payment page.
Example Data: [{"image": "https://momo.vn/uploads/product1.jpg", "name": "Product 1", "quantity": 1, "amount": 20000}, {"image": "https://momo.vn/uploads/product2.jpg", "name": "Product 2", "quantity": 2, "amount": 30000}]
userInfoObjectUser Info
Example Data: {"phoneNumber": "0123456789", "email": "momo@momo.vn", "name": "momo" }
autoCaptureBooleanIf set to false, the payment will not be automatically captured.
Note: autoCapture = 'false' only applies to payment methods via MoMo e-Wallet and Credit card
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 items content

AttributeTypeRequiredDescription
idStringSKU number
nameStringName of the product
descriptionStringDescription of the product
categoryStringProduct classification/Product category
imageUrlStringLink image of product
manufacturerStringName of manufacturer
priceLongUnit price
Currency: VND
currencyStringVND
quantityIntegerQuantity number of the product. It must be greater than 0
unitStringThe units of measurement used for products
totalPriceLongTotal price = price x quantity
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 userInfo content

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: Link to open website.

AppLink: Link to open mobile application.

Learn more about AppLink

Example Request

{
"partnerCode": "MOMO",
"partnerName" : "Test",
"storeId" : "MoMoTestStore",
"requestType": "payWithMethod",
"ipnUrl": "https://momo.vn",
"redirectUrl": "https://momo.vn",
"orderId": "MM1540456472575",
"amount": 150000,
"lang": "vi",
"orderInfo": "SDK team.",
"orderExpireTime" : 30,
"requestId": "MM1540456472575",
"extraData": "eyJ1c2VybmFtZSI6ICJtb21vIn0=",
"signature": "fd37abbee777e13eaa0d0690d184e4d7e2fb43977281ab0e20701721f07a0e07"
}

HTTP Response

List of payment methods that MoMo provides:

AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringSame as the original request
orderIdStringPartner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$
amountLongSame as the original payment amount
responseTimeLongTime to respond payment results to partner
Format: timestamp
messageStringError description, error language is based on lang
resultCodeIntegerResult Code
payUrlStringURL for switching from the partner's page to the MoMo payment page
shortLinkStringA short URL represents a payUrl containing parameters in a smaller and simpler format

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="
"shortLink": "https://test-payment.momo.vn/shortlink/smTZN2oL2s"
}

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
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$
requestIdStringPartner's requestId
amountLongPayment amount
orderInfoStringOrder's information
partnerUserIdStringMoMo's unique identifier for each MoMo eWallet account.
orderTypeStringmomo_wallet
transIdLongMoMo's transaction ID
resultCodeIntegerTransaction status of the order Result Code
messageStringError description, languague is based on lang
payTypeStringPayment type: qr, webApp, credit or napas
responseTimeLongTime to respond payment results to partner
Format: timestamp
extraDataStringextraData. 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