The Merchant Transaction ID is an alpha numeric field that can be set in the SDK on all transactions. If you do not set one, then the Base platform will set it for you. Base will set the merchant transaction ID to be the same value as the BankAccountTransaction's ID, which is the unique ID set on every transaction. You can pull data based off this field which will return a list of all Bank Account Transactions under your merchant with the merchant transaction ID matching the passed in string. An example below will show how that works.
Setting the Merchant Transaction ID
Requiring Unique Merchant Transaction ID
Another use for the merchant transaction ID is to require unique transactions. In the merchant portal under the settings page under the Payment Method Verification header is the checkbox to enable this. If enabled, when a transaction successfully processes (not failing validation) with a merchant transaction ID set, if a second transaction is tried to be processed with the same merchant transaction ID it will fail validation and not process the transaction.
Getting BankAccountTransaction's that match a Merchant Transaction ID that are processed on the Base Commerce Platform using the BankAccountTransaction object to encapsulate all of the data needed. The list of that merchants transactions with that merchant transaction ID set can be called by using the BaseCommercePayClient's method getBankAccountTransactionByMerchantTransactionID().
Process a getBankAccountTransactionByMerchantTransactionID:
Method on BankAccountTransaction
Merchant Transaction ID
|Only one Merchant Transaction ID is sent|