Skip to main content

Confirm Payment

A payment can only be captured if it has an Authorized status. The Authorized status can only be obtained for direct credit card, momo wallet payments initiated with Capture parameter set to false.

After successful authorization, the respective transaction will have the status of 9000:Authorized. Partner will process internal operations and call this API to complete the transaction, called confirm API, including 2 statuses:

  • Confirm (capture): Partner processes the transaction successfully, and this status will transfer the money to respective partner’s wallet. Respective transaction from MoMo’s side will complete with Successful status.
  • Cancel (cancel): Partner fails to process the transaction, and this status will return the money on hold from the momo to the user’s card. The respective transaction from MoMo’s side will complete with Failed status.

Connecting info to MoMo

HTTP Request

POST /v2/gateway/api/confirm

AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringRequest ID, unique for each request,
MoMo's partner uses the requestId field for idempotency control
orderIdStringOrderId authorized
requestTypeStringRequest type, with 2 values:
- Confirm transaction: capture
- Cancel transaction: cancel
amountLongAmount on hold
langStringLanguage of returned message (vi or en)
callbackUrlStringA partner's URL. This URL is used to redirect from MoMo page to partner
descriptionStringReason description (used in the case of rollback)
signatureStringSignature to check information. Use Hmac_SHA256 algorithm with data in format: accessKey=$accessKey&amount=$amount&description=$description
&orderId=$orderId&partnerCode=$partnerCode
&requestId=$requestId&requestType=$requestType
HTTP Response
AttributeTypeRequiredDescription
partnerCodeStringIntegration information
orderIdStringOrderId authorized
requestIdStringUnique ID of each request
amountLongAmount on hold
transIdLongMoMo's transaction ID
resultCodeintResult Code
messageStringError description, error language is based on lang
requestTypeStringRequest type, with 2 values:
- Confirm transaction: capture
- Cancel transaction: cancel
responseTimeLongTime to respond payment results to partner
Format: timestamp