Skip to main content

Subscription

Subscription payments are applicable for products or services that are consumed on an ongoing basis and follow a recurring payment model. When making the first purchase, your customers are requested to give pre-authorization for their future payments, which enables the available data for recurring and repeat transactions. Payments will be done at fixed intervals without any specific payment action from the consumer follow a subscription model.

Process Flow

Flow diagram

Register_flow

API Configuration

HTTP Information

Initiate Subscription Method

HTTP Request

POST /v2/gateway/api/create

AttributeTypeRequiredDescription
partnerCodeString(20)Merchant ID Integration information
partnerNameStringPartner name
storeIdStringStore ID
requestIdString(50)Request ID, unique for each request, MoMo's partner uses the requestId field for idempotency control
amountLongOrder amount in VND (0 or greater)
orderIdString(50)Partner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$ This is the Bill Id of a subscription, which is unique and will be regarded as the Initial OrderId used for later subsequent payments
orderInfoString(200)Order info from merchant
orderGroupIdLongThe orderGroupId will be provided by MoMo to classify groups of orders for further operational activities. Please contact MoMo to use this field.
redirectUrlString(200)MoMo Payment will redirect end-user back to Merchant using this URL, to notify result for end-user using HTTP GET request type
ipnUrlString(200)MoMo Payment will notify this URL. Merchant server needs to build this URL to receive results sent from MoMo, using HTTP POST request type with header application/json.
partnerClientIdStringMerchant’s unique identifier for each user (e.g.: user ID or email).
This ID will be linked with end-user’s MoMo account.
extraDataStringDefault value is empty ""
Encode base64 follow Json Format: {"key": "value"}
Example with data: {"username": "momo"}=> data of extraData: eyJ1c2VybmFtZSI6ICJtb21vIn0=
requestTypeString(20)subscription
subscriptionInfoObjectShort information
langString(20)Language return: vi or en
signatureString(65)Signature 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
&ipnUrl=$ipnUrl&orderId=$orderId&orderInfo=$orderInfo
&partnerClientId=$partnerClientId&partnerCode=
$partnerCode&redirectUrl=$redirectUrl&requestId=
$requestId&requestType=$requestType

Data of subscription Info

AttributeTypeRequiredDescription
nameStringThe name of this subscription
partnerSubsIdStringThe Id of this subscription, which is equivalent to its name above
subsOwnerStringThis is the user account (Phone number/Email/ Bill ID,..). In case customer authorizes Merchant to automatically charge for the same subscriptions with different user accounts, it should be displayed for customer recognition.
typeStringThe amount to be charged in each frequency cycle can be fixed or capped to max amount.
FIXED: Amount charged in each frequency cycle will be the same as recurringAmount
VARIABLE: Amount charged in each frequency cycle can be variable
recurringAmountLongAmount to be charged to the customer in each frequency cycle.
If type is FIXED, it is the fixed amount that can be charged to the customer in each frequency cycle. If type is VARIABLE, it is the maximum amount that can be charged to the customer in each frequency cycle.
frequencyStringThe frequency of recurring payments DAILY, WEEKLY, BI_WEEKLY, MONTHLY, BI_MONTHLY, QUARTERLY, SEMI_ANNUALLY
nextPaymentDateStringThis is the following payment date on which merchant will request to charge the customer via by token.
- In case subscription will start later or it has a free trial period (amount informed above = 0), nextPaymentDate is required, to inform customers the first date to be charged
- In case subscription starts instantly without a free trial period (amount informed above > 0), nextPaymentDate is optional. If not provided, nextPaymentDate will be calculated via MoMo based on attribute frequency
Format of date is YYYY-MM-DD
expiryDateStringDate when subscription will expire. Payment collection request will not be allowed since the expiry date.
Format of date is YYYY-MM-DD

Example Request

{
"partnerCode": "MOMO_PARTNER_A",
"requestType": "subscription",
"ipnUrl": "https://webhook.site/d946f723-129c-46dd-ab20-7c370375a05c",
"redirectUrl": "https://webhook.site/d946f723-129c-46dd-ab20-7c370375a05c",
"orderId": "0123456789",
"amount": "0",
"lang": "en",
"orderInfo": "Test 1234556",
"requestId": "1234567891",
"partnerClientId": "user123456",
"extraData": "eyJyZXN1bHRfbmFtZXNwYWNlIjoidW1hcmtldCIsImVycm9yIjoiIiwic3RhdGUiOjZ9",
"signature": "96fb584f7da1a81022911f4b6aff9bd5f159653f4f7d46d172e869fb8876a5be",
"subscriptionInfo": {
"partnerSubsId": "SubId-1645170503079",
"name": "Goi ABC Premium 1645170503079",
"subsOwner": "Owner A",
"type": "VARIABLE",
"recurringAmount": 60000,
"nextPaymentDate": "2022-02-22",
"expiryDate": "2023-02-22",
"frequency": "MONTHLY"
}
}
HTTP Response
AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringSame as the original request
orderIdStringInitial OrderId
amountLongOrder amount in VND (0 or greater)
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.
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.
resultCodeintError code
messageStringError description, error language is based on lang
responseTimeLongTime to respond payment results to partner Format: timestamp
partnerClientIdStringMerchant’s unique identifier for each user (e.g.: user ID or email). This ID will be linked with end-user’s MoMo account.

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

Example Response

{
"partnerCode": "MOMO_PARTNER_A",
"orderId": "0123456789",
"requestId": "1234567891",
"amount": 0,
"responseTime": 1645170502966,
"message": "Successful.",
"resultCode": 0,
"payUrl": "https://test-payment.momo.vn/v2/gateway/pay?t=TU9NT0lPTEQyMDE5MDEyOXwwMTIzNDU2Nzg5MDEyMzQ1MTY0NTE3MDUwMzA3OQ==",
"deeplink": "momo://?action=subscription&isScanQR=false&sid=TU9NT0lPTEQyMDE5MDEyOXwwMTIzNDU2Nzg5MDEyMzQ1MTY0NTE3MDUwMzA3OQ==&v=2.1",
"qrCodeUrl": "https://test-payment.momo.vn/v2/gateway/app?isScanQr=true&t=TU9NT0lPTEQyMDE5MDEyOXwwMTIzNDU2Nzg5MDEyMzQ1MTY0NTE3MDUwMzA3OQ==",
"partnerClientId": "user123456"
}

Process 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
requestIdStringEach Request’s Identification
amountLongAmount to pay
orderIdStringInitial OrderId
partnerUserIdStringMoMo's unique identifier for each MoMo eWallet account.
orderTypeStringmomo_wallet
orderInfoStringOrder info
partnerClientIdStringIdentifier of user
callbackTokenStringToken info used to get payment token
transIdLongMoMo's transaction ID
resultCodeIntegerOrder status
messageStringdescription of resultCode based on lang
payTypeStringPayment Type: webApp, app,qror miniapp
responseTimeLongTime to return payment result in miliseconds
extraDataStringAdditional info
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&callbackToken=
$callbackToken&extraData=$extraData&message=$message
&orderId=$orderId&orderInfo=$orderInfo&orderType=
$orderType&partnerClientId=$partnerClientId
&partnerCode=$partnerCode&payType=$payType&requestId=
$requestId&responseTime=$responseTime&resultCode=
$resultCode&transId=$transId

The signature is encrypted using secretKey and accessKey, so you must keep it secret, not expose to any chat channels, or in source code, git, etc.

Receive Subscription Token

After receiving callbackToken from transaction result, merchant will send a request to MoMo to get user's token info

HTTP Request

POST /v2/gateway/api/subscription/create

ParameterTypeRequiredDescription
partnerCodeStringIntegration information
callbackTokenStringcallbackToken as access token, received from payment result
requestIdString(50)Request ID, unique for each request, MoMo's partner uses the requestId field for idempotency control
orderIdStringInitial OrderId
partnerClientIdString(50)Identifier of transaction with saved token
langStringLanguage¸ of returned message (vi or en)
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&callbackToken=$callbackToken&orderId=
$orderId&partnerClientId=$partnerClientId&partnerCode=
$partnerCode&requestId=$requestId

Example request

{
"partnerCode": "MOMO_PARTNER_A",
"requestId": "2f10f50d933d",
"callbackToken": "v2/qml0PbOlrBYjFlZv…8StiawfZPiKoUGvywNHV",
"orderId": "0123456789",
"partnerClientId": "user123456",
"signature": "fa8b66df31cc7045783323f1e4492d7b71c1de4c9e1b71002f95a1aa869e885a",
"lang": "vi"
}
HTTP Response
AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringEach Request’s Identification
orderIdStringInitial OrderId
aesTokenStringsubscription object json encrypted using AES
resultCodeIntegerOrder status
partnerClientIdString Merchant’s unique identifier for each user (e.g.: user ID or email). This ID will be linked with end-user’s MoMo account
responseTimeLongTime to respond payment results to partner Format: timestamp
messageStringResult description based on lang

Data of token after decrypted

AttributeTypeRequiredDescription
valueStringsubscription Value as recurring subscription
initialOrderIdStringInitial OrderId (regarded as the orderId of this subscription)
userAliasStringMoMo masked wallet ID (only show last 4 digits)
profileIdStringMoMo hash wallet ID

Example response

{
"timestamp": 1600678154664,
"partnerCode": "MOMO_PARTNER_A",
"requestId": "2f10f50d933d",
"orderId": "0123456789",
"partnerClientId": "user123456",
"resultCode": 0,
"responseTime": 145784525,
"message": "Success",
"aesToken": "NplHKEhGuFoo5o5vbMeJwrsk7wXEPnCjSZv6DgivW1a8JKw1gdXq2WS7UsPwoJv0yf6rbGiVV6nOKAxU8kTNg4SZraqJnf7GAq9OSE2LiNs="
}

Pay using Subscription

When the subscription reaches the payment date, Merchant can make the payment request without user confirmation, according to the authorization from users before.

HTTP Request

POST /v2/gateway/api/subscription/pay

ParameterTypeRequiredDescription
partnerCodeStringIntegration information
partnerNameStringPartner name
orderIdStringPartner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$
amountLongPayment amount
Min: 1000 VND
Max: equal to the value of recurringAmount informed before
Currency: VND.
requestIdString(50)Request ID, unique for each request, MoMo's partner uses the requestId field for idempotency control
tokenStringEncrypt a object json by RSA using public Key RSA Encryption
partnerClientIdString(50)Merchant's unique user info
orderInfoStringShort information
orderGroupIdLongThe orderGroupId will be provided by MoMo to classify groups of orders for further operational activities. Please contact MoMo to use this field.
extraDataStringDefault value is empty ""
Encode base64 follow Json Format: {"key": "value"}
Example with data: {"username": "momo"}=> data of extraData: eyJ1c2VybmFtZSI6ICJtb21vIn0=
nextPaymentDateStringThis is the following payment date on which merchant will request to charge customers via token, which will be used to raise customer awareness of the upcoming charge:
- If not provided, nextPaymentDate will be calculated via MoMo based on attribute frequency and lastPaymentDate
- If nextPaymentDate is provided but not rational (> +- 2 days compared with the nextPaymentDate calaculated by MoMo), MoMo will use the calculated ones.
Format of date is YYYY-MM-DD
langStringLanguage of returned message (vi or en)
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
&orderId=$orderId&orderInfo=$orderInfo&partnerClientId=
$partnerClientId&partnerCode=$partnerCode&requestId=
$requestId&token=$token

Data of token before encrypted

AttributeTypeRequiredDescription
valueStringsubscription Value as recurring subscription
initialOrderIdStringInitial OrderId (regarded as the orderId of this subscription)
{
"value": "2d6c6f28cead966d1f53fb61bc4ad45f018a26f21e5e6917b5f7c3408a13f1de",
"initialOrderId": "0123456789"
}

Example request

{
"token": "YH69iNB6DNGkRDV+5dy65BdJLZflqvTQ0z5I3k5FE2u...",
"partnerCode": "MOMO_PARTNER_A",
"orderId": "12345678911",
"amount": "20000",
"lang": "vi",
"orderInfo": "Thanh toan goi subs aaa",
"requestId": "12345678911",
"extraData": "",
"partnerClientId": "user123456",
"nextPaymentDate": "2022-03-22",
"signature": "2512s1d2s1ds21d2s1d1ce5d1a251#@"
}

HTTP Response

AttributeTypeRequiredDescription
partnerCodeStringIntegration information
orderIdStringPartner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$entification
requestIdStringEach Request’s Identification
amountLongAmount to pay
transIdLongMoMo's transaction ID
responseTimeLongTime to respond payment results to partner Format: timestamp
partnerClientIdStringMerchant’s unique identifier for each user (e.g.: user ID or email). This ID will be linked with end-user’s MoMo account.
resultCodeIntegerOrder status
messageStringResult description, language is based on lang

Example response

{
"partnerCode": "MOMO_PARTNER_A",
"requestId": "12345678911",
"orderId": "12345678911",
"amount": 60000,
"responseTime": 145758545,
"partnerClientId": "user123456",
"resultCode": 0,
"message": "Success"
}

If transaction is failed 2 times due to insufficient funds, MoMo will deactivate the subsToken (pause this authorization), which means we temporarily stop accepting payment requests from merchant until the authorization is reactivated by customer.

Pause/cancel an authorization

In case automatic payments could not be made, Merchant will stop offering the products or services, which means the subscription is not re-newed. Merchant can request to pause/cancel this subsToken (the authorization), due to this subscription is no longer available.

HTTP Request

POST /v2/gateway/api/subscription/manage

ParameterTypeRequiredDescription
partnerCodeStringIntegration information
requestIdString(50)Request ID, unique for each request, MoMo's partner uses the requestId field for idempotency control
orderIdString(50)OrderId of partner, unique for each request
tokenStringEncrypt a object json by RSA using public Key RSA Encryption
partnerClientIdString(50)Merchant's unique user info
langString(20)Language of returned message (vi or en)
actionString(20)- pause: to temporarily stop processing payment requests until the subsToken is reactivated (usable when current subsToken status is active).
- cancel: to permanently stop processing payment requests (usable when current subsToken status is active/paused)
signatureString(65)Signature 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&orderId=$orderId&partnerClientId=
$partnerClientId&partnerCode=$partnerCode&requestId=
$requestId&token=$token

Data of token before encrypted

AttributeTypeRequiredDescription
valueStringsubscription Value as recurring subscription
initialOrderIdStringInitial OrderId (regarded as the orderId of this subscription)
{
"value": "2d6c6f28cead966d1f53fb61bc4ad45f018a26f21e5e6917b5f7c3408a13f1de",
"initialOrderId": "0123456789"
}

Example request

{
"partnerCode": "MOMO_PARTNER_A",
"requestId": "12345678912",
"orderId": "12345678912",
"partnerClientId": "user123456",
"token": "Vqy3A3kGm8kkZZjBKHoQCgs779rSbm4TppXVCCxtEmNpGJo+bYRiZ0Vj...",
"lang": "vi",
"signature": "dc4e7186deb1455b1af460d1dc6e9ae2e6fb568107abd517ee1147a5bf37572c",
"action": "pause"
}
HTTP Response
AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringEach Request’s Identification
orderIdString(50)OrderId of partner, unique for each request
messageStringResult description, language is based on lang
resultCodeIntegerOrder status
partnerClientIdString Merchant's unique user info
responseTimeLongTime to respond payment results to partner Format: timestamp

Example response

{
"partnerCode": "MOMO_PARTNER_A",
"orderId": "12345678912",
"requestId": "12345678912",
"resultCode": 0,
"message": "Success",
"partnerClientId": "user123456",
"responseTime": 14548754653232
}

Reactivate an authorization

After an authorization is paused, customer can request to reactivate it, as long as the authorization does not pass its expiration date. This reactivation should be requested by merchant (after customer confirmation), to ensure that merchant is informed of this action. MoMo will accept payment requests after successful reactivation.

HTTP Request

POST /v2/gateway/api/subscription/manage

ParameterTypeRequiredDescription
partnerCodeStringIntegration information
requestIdString(50)Request ID, unique for each request, MoMo's partner uses the requestId field for idempotency control
orderIdString(50)OrderId of partner, unique for each request
tokenStringEncrypt a object json by RSA using public Key RSA Encryption
partnerClientIdString(50)Merchant's unique user info
langString(20)Language of returned message (vi or en)
actionString(20)reactivate: current subsToken status is paused.
redirectUrlString(200)MoMo Payment will redirect end-user back to Merchant using this URL, to notify result for end-user using HTTP GET request type
ipnUrlString(200)MoMo Payment will notify this URL. Merchant server needs to build this URL to receive results sent from MoMo, using HTTP POST request type with header application/json.
signatureString(65)Signature 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&orderId=$orderId&partnerClientId=
$partnerClientId&partnerCode=$partnerCode&requestId=
$requestId&token=$token

Data of token before encrypted

AttributeTypeRequiredDescription
valueStringsubscription Value as recurring subscription
initialOrderIdStringInitial OrderId (regarded as the orderId of this subscription)
{
"value": "2d6c6f28cead966d1f53fb61bc4ad45f018a26f21e5e6917b5f7c3408a13f1de",
"initialOrderId": "0123456789"
}

Example request

{
"partnerCode": "MOMO_PARTNER_A",
"requestId": "12345678913",
"orderId": "12345678913",
"partnerClientId": "user123456",
"token": "Vqy3A3kGm8kkZZjBKHoQCgs779rSbm4TppXVCCxtEmNpGJo+bYRiZ0Vj...",
"lang": "vi",
"signature": "dc4e7186deb1455b1af460d1dc6e9ae2e6fb568107abd517ee1147a5bf37572c",
"action": "reactivate",
"ipnUrl": "https://webhook.site/d946f723-129c-46dd-ab20-7c370375a05c",
"redirectUrl": "https://webhook.site/d946f723-129c-46dd-ab20-7c370375a05c"
}
HTTP Response
AttributeTypeRequiredDescription
partnerCodeStringIntegration information
requestIdStringEach Request’s Identification
orderIdStringInitial OrderId
messageStringResult description, language is based on lang
resultCodeIntegerOrder status
partnerClientIdString Merchant's unique user info
responseTimeLongTime to respond payment results to partner Format: timestamp
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.
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.

Example response

{
"partnerCode": "MOMO_PARTNER_A",
"orderId": "123456789123",
"requestId": "123456789123",
"resultCode": 0,
"message": "Success",
"responseTime": 14548754653232,
"partnerClientId": "user123456",
"payUrl": "http://localhost:9999/v2/gateway/pay?t=TU9NT0lPTEQyMDE5MDEyOXwxNjQ5MTI3NjI5MzYyOjAxMjM0NTY3Nzg=",
"deeplink": "momo://?action=updateSubscription&isScanQR=false&sid=TU9NT0lPTEQyMDE5MDEyOXwxNjQ5MTI3NjI5MzYyOjAxMjM0NTY3Nzg=&v=2.1",
"qrCodeUrl": "http://localhost:9999/v2/gateway/app?isScanQr=true&t=TU9NT0lPTEQyMDE5MDEyOXwxNjQ5MTI3NjI5MzYyOjAxMjM0NTY3Nzg=",
"deeplinkMiniApp": "momo://?action=updateSubscription&isScanQR=false&sid=TU9NT0lPTEQyMDE5MDEyOXwxNjQ5MTI3NjI5MzYyOjAxMjM0NTY3Nzg=&v=2.1"
}

Process reactivate result

Same with Process Payment Result.

Action from MoMo's side

Request header: application/json - Response header: application/json

Some actions from MoMo's side can make token become invalid, such as customers want to cancel/pause the authorization from MoMo App, or MoMo automatically updates status when the authorization passes its expiry date.

Merchant has to provide the endpoint to receive notify of these actions sent from MoMo, using HTTP POST.

HTTP Request
AttributeTypeRequiredDescription
partnerCodeStringMerchant ID
requestIdStringUnique ID for each request
orderIdStringOrderId of transaction initialized with requestType subscription
requestTypeString- pause: User chose to pause this subs authorization. User can reactivate it anytime.
- cancel: User chose to cancel this subs authorization.
- lock: MoMo temporarily locked the subs authorization due to exceed maximum failed payment requests. User can reactivate it anytime.
- expire: The subs authorization can not be used anymore because it passed its expiry date.
partnerClientIdStringVendor’s unique identifier of each user (e.g.: user ID or email) that linked with MoMo wallet
tokenTypeStringsubscription
signatureStringSignature to confirm information. Secure transaction in Hmac_SHA256  algorithm with format
accessKey=$accessKey&orderId=$orderId&partnerClientId=$partnerClientId
&partnerCode=$partnerCode&requestId=$requestId
&requestType=$requestType&tokenType=$tokenType

Example

{
"partnerCode": "MOMOIQA420180417",
"requestId": "0e0ceb2a-ea06-4ca7-b63a-e5c8948a5bfc",
"orderId": "012457855:231454545",
"partnerClientId": "sangle@mservice.com.vn",
"requestType": "lock",
"tokenType": "subscription",
"signature": "bd4df3f3bad6815a9a7be1f1f5c8576f3f97eab25327247425f12a3fb4a78873"
}

You need to respond with HTTP code 204 (No Content)!

CallbackToken Inquiry

If merchant system can not receive or record callbackToken, Merchant can request MoMo Payment to query callbackToken. Note that callbackToken has a default expire date of 10 minutes, counting from the time it is generated.

Request header: application/json - Response header: application/json

HTTP Request

POST /v2/gateway/api/subscription/cbQuery

AttributeTypeRequiredDescription
partnerCodeString(20)Merchant ID
requestIdString(50)Request ID, unique for each request
orderIdString(50)It must be matched with orderId used in subscription
partnerClientIdString(50)It must be matched with partnerClientId used in subscription
langString(20)vi or en
signatureString(65)Signature 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&orderId=$orderId
&partnerClientId=$partnerClientId&partnerCode=$partnerCode
&requestId=$requestId

Example

{
"partnerCode": "MOMO_PARTNER_A",
"requestId": "1527246504579",
"orderId": "1527246478428",
"partnerClientId": "user123456",
"lang": "vi",
"signature": "13be80957a5ee32107198920fa26aa85a4ca238a29f46e292e8c33dd9186142a"
}
HTTP Response
AttributeTypeDescription
partnerCodeStringMerchant ID
requestIdStringRequest ID, unique for each request
orderIdStringPartner Transaction ID
Regex: ^[0-9a-zA-Z]([-_.]*[0-9a-zA-Z]+)*$, stored on MoMo payment system
callbackTokenStringThe callback token generated by MoMo.
resultCodeintResult code
messageStringDescription regarding result code, based on lang
responseTimelongResponse time

Example

{
"partnerCode": "MOMO_PARTNER_A",
"requestId": "1527246504579",
"orderId": "1527246478428",
"callbackToken ": "u7YYQZnAbLQivB0p5SHT9LIhjshqarXyobE_WzCCa4vDt58r",
"resultCode": 0,
"message": "Success",
"responseTime": 127264428
}

Result Codes & Messages

These result codes and messages are exclusively assigned for the Subscription flow in Tokenization Payments. Additionally, kindly locate other result codes and messages in the comprehensive list of result codes provided here.

Result codeDescriptionFinal StatusRecommended actionsType
0Successful.Yes
2001Transaction failed due to invalid token.YesThe token has been deleted, please update accordingly.Merchant error
2007Transaction failed due to inactive token.YesThe token is inactive due to user decided to temporary lock the binding.User error
2012Request rejected due to invalid token.YesThe token does not exist or has been deleted. Token status can not be updated.Merchant error
2015Payment cannot be made until next payment period.YesPlease check the payment period and resend the request later.Merchant error
2016Transaction rejected because the payment period has expired/passed.YesMerchant error

See also