L

d Guidelines

INTRODUCTIONPARAMETERS AND CALLBACK PAGESIMPLEMENTATIONSAMPLE CODE STRUCTURESCONTACT USPAST RELEASE
INTRODUCTION

MegaTransfer provides a wide range of financial services available worldwide: from transferring money and exchanging currencies, to financial institutions and banking alternatives. But one of the most common use of payment system like MegaTransfer, is to accept payments from clients via merchant perspective.

Once registered and successfully verified by MegaTransfer, merchants can integrate the payment gateway (or we can call it here as “MTG” - stands for MegaTransfer Gateway) instantly.

One great attribute of MTG is that it allows merchants to accept four (4) different types of payment methods by just installing a single block of code. The following payment types are accepted by MTG:

  1. VISA and MasterCard
  2. MegaTransfer Wallet
  3. China UnionPay
  4. Wire Transfer

This manual should help merchants to implement and integrate MTG to their respective online shops. We ensure each and every merchants a safe and secure payment environment between their website and to MTG server.

PARAMETERS

The following parameters are needed in order for us to integrate properly the MTG. All API requests must be sent to https://www.megatransfer.com/payments by POST method.

  • items Selected product to be bought by client (alphanumeric, required).
  • quantity Number of items (numeric, required).
  • amount Price of the item (float, required).
  • currency Credit Cards - EUR, GBP, USD, RUB
    MegaTransfer Wallet - EUR, USD, GBP, AED, AUD, BTC, CAD, CHF, CNY, CZK, DKK, HKD, HUF,ILS, IDR, INR, JPY, KWD, LTC, LTL, MYR, NOK, NZD, PHP, PLN, RON, RUB, SAR, SEK, SGD
    China UnionPay - EUR, USD, GBP, AED, AUD, CAD, CHF, CNY, CZK, DKK, HKD, HUF,ILS, IDR, INR, JPY, KWD, LTL, MYR, NOK, NZD, PHP, PLN, RON, RUB, SAR, SEK, SGD
    Wire Transfer - EUR, USD, GBP, CZK, NOK, SEK, CHF, CAD, AUD, DKK, HKD, JPY, NZD, PLN, RUB, SGD
  • total_amount quantity * amount (float, required)
    If currency is RUB, converted total_amount must be equal or greater than 2.00 USD.
  • merchant_id Your merchant ID, please check Merchant Setup (required)
  • order_id Order ID from merchant’s system (required).
  • client_name Name of end user inside Merchant's system. (required)
  • client_country Country name or country code of end user inside Merchant's system. (required)
  • client_city City of end user inside Merchant's system. (required)
  • client_email Email address of end user inside Merchant's system. (required)
  • client_regdate Registration date of end user inside Merchant's system. (required, format[YYYY-MM-DD])
  • url URL on merchant's system triggered by end users before entering MegaTransfer process (required)
  • payment_method Method/s to be used on processing the payment of client. (required)
    MT - to accept payments via wallet to wallet transfer.
    CC - to accept credit or debit card payments.
    CH - to accept China UnionPay payments.
    WT - to accept wire transfer payments.
    ALL - to accept all payment methods.
    | (vertical bar) - delimiter to be used between two or more payment methods.

    Sample strings:
    MT|CC - to show a gateway with Megatransfer and Credit Card as options.
    CH|CC|WT - to show a gateway with China UnionPay, Credit Card, and Wire Transfer as options.
    CC - to remove option lightbox and gateway will proceed to credit card platform.
  • success_url default address of page where client will be redirected after successful payment. (required)
  • fail_url default address of page where client will be redirected when an error occurred during payment. (required)
  • callback_url default address of page for performing and receiving POST variables in JSON format through cURL method. (required)
  • version Version number of implemented gateway. You can see it on the first page of PDF guide or Integration pages of MegaTransfer. (optional)
  • gateway_id 0 - test gateway
    1 - live gateway

    Use this test account username for test gateway.
    username : testmegatransfer@gmail.com
    password : testmt@1234
  • signature composed of hash ​("sha256",(secret code + separator + merchant_id +separator + items +separator + quantity + separator + amount + separator + total_amount + separator + currency + separator + secret code)) where :
    secret code - Indicated in your merchant setup.
    separator - Indicated in your merchant setup.
    (required)

RETURN PARAMETERS
  • items Selected product to be bought by client.
  • quantity Number of items.
  • amount Price of the item.
  • currency Credit Cards - EUR, GBP, USD, RUB
    MegaTransfer Wallet - EUR, USD, GBP, AED, AUD, BTC, CAD, CHF, CNY, CZK, DKK, HKD, HUF,ILS, INR, JPY, KWD, LTC, LTL, NOK, NZD, PHP, PLN, RON, RUB, SAR, SEK, SGD
    China UnionPay - EUR, USD, GBP, AED, AUD, CAD, CHF, CNY, CZK, DKK, HKD, HUF,ILS, INR, JPY, KWD, LTL, NOK, NZD, PHP, PLN, RON, RUB, SAR, SEK, SGD
    Wire Transfer - EUR, USD, GBP, CZK, NOK, SEK, CHF, CAD, AUD, DKK, HKD, JPY, NZD, PLN, RUB, SGD
  • total_amount quantity * amount
  • merchant_id Your merchant ID.
  • order_id Order ID from merchant’s system.
  • transaction_id Reference number from Megatransfer system.
    For success transaction only.
  • status WT - "pending" or "failed"
    MT,CC,CH - "successful" or "failed"
  • payment_method MT - payments via wallet to wallet transfer.
    CC - credit or debit card payments.
    CH - China UnionPay payments.
    WT - wire transfer payments.
  • amount_credited Amount credited to your MegaTransfer wallet.
    For success transaction only.
  • message Error message.
    For fail transaction only.
  • token composed of hash("md5",(secret code + order_id + transaction_id + secret code)) where :
    secret code - Indicated in your merchant setup.
    For success transaction only.
IMPLEMENTATION

When clients of the merchant selects Megatransfer as their payment method, clients are actually sending data to MegaTransfer’s web servers through safe and secure connection. Data sent by clients contains the payment information that makes up the behavior of MTG.

Shopping cart
Process page
MegaTransfer payment gateway
  • Shopping Cart contains items, quantity, amount, currency and total_amount to be posted on Process Page.
  • Process Page contains items, quantity, amount, currency total_amount, order_id and signature to be posted in MTG.

Initially, when MTG is successfully implemented, merchants are only allowed to use one (1) payment method - the MegaTransfer Wallet. In order to start accepting VISA, MasterCard, and CUP (China UnionPay), merchants need to submit verification documents that supports the idea that their business is in good standing.

Once verified, MegaTransfer will automatically add the remaining payment methods on merchant’s MTG setup.


WIRE TRANSFER API

Wire Transfer can be added as a payment option by switching it ON from Merchant Setup page. All transactions made in wire transfer method will be automatically tagged as "Pending" on our system. We need to receive an actual wire transfer from your clients before making the status as "Completed" or "Declined". We will credit your wallets once we receive the wire transfer payment from your clients. You can check the status of the wire transfer payments using this link:

https://www.megatransfer.com/payments/wireTransferAPI/[MERCHANT ID]/[MERCHANT KEY]/[ORDER ID]

Both Merchant ID and Merchant Key can be found on your Merchant Setup page. Order ID is optional. Leaving it blank will list all payment transactions under your merchant account, otherwise, it will show records based on that specific Order ID.

SAMPLE CODE STRUCTURES

STRUCTURE OF PHP REQUEST

STRUCTURE OF JSON RESPONSE Failed
Success

STRUCTURE OF PHP CALLBACK
CONTACT US
  • Email support@megatransfer.com
  • Phone +44 (0)20 7193 0226
  • Skype mtuk.support
Recent Version
  • t MTG Guide 2.8.3 Effective on: 05/25/2017 1. API requests should now be sent to https://www.megatransfer.com/payments.
Past Release
  • t MTG Guide 2.8.2 12/05/2016 1. Added sample script that will allow merchant to notify MegaTransfer if merchant already received the callback (see Structure of PHP callback section).
  • t MTG Guide 2.8 05/01/2016 1. Added validation on allowed currencies on each payment method.
    2. Added payment_method parameter that will allow merchants to dynamically select payment options per MTG setup.
    3. Added success_url that will allow merchants to dynamically designate a Success URL per MTG setup.
    4. Added fail_url that will allow merchants to dynamically designate a Fail URL per MTG setup.
    5. Added callback_url that will allow merchants to dynamically designate a Callback URL per MTG setup.
    6. Allowed merchant to receive status of payment. "Successful" or "Failed" on credit card, wallet to wallet, and CUP. "Pending" or "Failed" on wire transfer.
    7. Allowed merchant to receive the type of payment used by the client to pay for the items.
    8. Allowed merchant to receive the amount to be credited on his MegaTransfer wallet.
    9. Removed "Wire Transfer Message URL". For wiretransfer gateway, MegaTransfer hardly suggest that merchant must put it on a separate MTG setup using "WT" as payment_method and having its own success_url.
    10. Added version parameter that will help MegaTransfer detect the gateway version installed by merchant.
  • t MTG Guide 2.7 04/02/2016 1. Showed accepted currencies per payment option.
    2. Added validation for RUB payments.
    3. Fixed the past issue about "success" wire transfer status. All wire transfer transactions made via gateway will now be tagged as "pending".