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
Minimum timeout when call this API must be 30s to ensure receive response from MoMo.
POST /v2/gateway/api/confirm
Attribute | Type | Required | Description |
---|---|---|---|
partnerCode | String | Integration information | |
requestId | String | Request ID, unique for each request, MoMo's partner uses the requestId field for idempotency control | |
orderId | String | OrderId authorized | |
requestType | String | Request type, with 2 values: - Confirm transaction: capture - Cancel transaction: cancel | |
amount | Long | Amount on hold | |
lang | String | Language of returned message (vi or en ) | |
description | String | Reason description (used in the case of rollback ) | |
signature | String | Signature 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 |
Attribute | Type | Required | Description |
---|---|---|---|
partnerCode | String | Integration information | |
orderId | String | OrderId authorized | |
requestId | String | Unique ID of each request | |
amount | Long | Amount on hold | |
transId | Long | MoMo's transaction ID | |
resultCode | int | Result Code | |
message | String | Error description, error language is based on lang | |
requestType | String | Request type, with 2 values: - Confirm transaction: capture - Cancel transaction: cancel | |
responseTime | Long | Time to respond payment results to partner Format: timestamp |