MMG’s Checkout Payment flow enables registered MMG Merchants to
receive E‑Commerce payments from MMG customers. Not a registered
merchant? Visit
Register or email
Merchantservice@mmg.gy.
Checkout Lifecycle
-
Generate a new Checkout URL when the customer is ready to
purchase.
- Redirect the customer to the MMG-hosted Checkout page.
- The customer authenticates and authorizes the payment.
-
MMG redirects the user to your
Callback URL with payment confirmation details.
All communication between the Merchant’s application and MMG’s
E‑Commerce APIs occurs over HTTPS. For security, all data
exchanged during Checkout is encrypted using PEM. MMG will
generate PEM public and private key pairs and share.
Getting Started
Ensure you have the following Merchant-specific details:
- Merchant Client ID
- PEM Public Key from MMG
- PEM Private Key from MMG
- Secret Key
Additionally, share the following with MMG:
- Response URL
- Error URL
- Notify URL (Optional)
MMG will send the outcome of the Payment Request (Success or
Failure) to the Response URLs. The response is encrypted using
the public key (in PEM format) and can be decrypted with the corresponding
private key.If MMG cannot decrypt the Payment
Request, an error response will be sent to the Error URL.
Checkout Page
Redirect customers to MMG Checkout using the following URL format:
https://BASE_URL?token=TOKEN&merchantId=MERCHANTID&X-Client-ID=X-CLIENT-ID
- BASE_URL – MMG Checkout base URL
-
TOKEN – Encrypted JSON object containing checkout
details
-
MERCHANTID – 7-digit mobile number linked to your
Merchant account
-
X‑CLIENT‑ID – Merchant Client ID shared by MMG
Generating a Token
Base Parameters (JSON)
| Parameter |
Description |
Retreived / Generated By |
| secretKey |
Secret Key provided by MMG during onboarding |
MMG |
| merchantId |
Your Merchant Mobile Number (7 digits) |
Merchant |
| merchantName |
Your Merchant Name |
Merchant |
| merchantTransactionId |
Transaction ID generated by your system |
Merchant |
| amount |
Total amount to be paid by the customer |
Customer/Merchant |
| productDescription |
Description displayed on Checkout Page |
Customer/Merchant |
| requestInitiationTime |
Datetime of the Checkout transaction |
System |
{
"secretKey": "EQ0T2/32Q0eZZ6W2sEGCZCWVC7A3mwCmRdQ2q+NMWpFeYOetlz3zGxQQB/O9luQ2",
"amount": "3000",
"merchantId": "9991161",
"merchantTransactionId": "1765472622",
"productDescription": "MMG Product 2",
"requestInitiationTime": "1765472622",
"merchantName": "Ecommerce Merchant"
}
Encryption & Encoding
-
Encrypt the JSON object using the
PEM Public Key provided by MMG.
-
Base64‑URL encode the encrypted bytes – this encoded value is your
TOKEN.
Redirecting
With these parameters, redirect the user to the Checkout URL. The
customer will see a summary and must authenticate using their MMG
credentials and OTP.
Checkout Response
After the user approves the transaction, MMG posts the response to
your configured Response URL. The encrypted
TOKEN must be decoded and decrypted with the
private PEM key.
- Decoding: Base64 decode the token.
-
Decryption: Use the Private PEM Key to
decrypt the decoded bytes.
Response Parameters (Decrypted JSON)
| Parameter |
Description |
| merchantTransactionId |
Transaction ID generated by Merchant |
| transactionId |
Transaction ID generated by MMG |
| ResultCode |
String describing payment result |
| ResultMessage |
Message associated with the ResultCode |
| htmlResponse |
Result message embedded in HTML |
Checkout Response
| Result Code |
Message |
Description |
| 0 |
Transaction Successful |
Payment was successful; Merchant can release
product/service/goods.
|
| 1 |
Agent Not Registered |
User is not registered with MMG. |
| 2 |
Payment Failed |
Payment has failed. |
| 3 |
Invalid Secret Key |
Secret Key is invalid (possible phishing or configuration
issue).
|
| 4 |
Merchant ID Mismatch |
Merchant ID did not match Merchant ID in the encrypted token.
|
| 5 |
Token Decryption Failed |
Incoming token is invalid or cannot be decrypted. |
| 6 |
Transaction Cancelled |
User clicked Cancel during Checkout. |
| 7 |
Request Timed Out |
The request timed out. |