Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Alex 2 posts 72 karma points
    Oct 05, 2017 @ 10:40

    Setting MerchantAccountID for a Braintree transaction


    Our Braintree account has multiple Merchant Accounts for different currencies, the default one is for USD, and there are also for AUD, CAD, EUR, GBP.

    Our Merchello shop API handles multiple currencies but regardless of the selected currency Braintree uses the default which is the USD one.

    I'm trying to set MerchantAccountId = "accountidfor_GBP" like braintree api docs but I'm not sure where.

    TransactionRequest request = new TransactionRequest
        Amount = 100.00M,
        MerchantAccountId = "your_merchant_account",
        PaymentMethodNonce = nonceFromTheClient

    This is how I'm doing the payment

    // Get the payment method
    var paymentGatewayMethod = checkoutManager.Payment.GetPaymentGatewayMethods().FirstOrDefault();
    var paymentMethod = paymentGatewayMethod.PaymentMethod;
    // Create the arguments
    var args = new ProcessorArgumentCollection();
        args.Add("cardholderName", cardholderName);
        args.Add("cardNumber", cardNumber);
        args.Add("expireMonth", expireMonth);
        args.Add("expireYear", expireYear);
        args.Add("cardCode", cardCode);
        //tried to add it here, but doesn't work 
        args.Add("MerchantAccountId", "account_id_for_GBP");
         // Set the nonce
         // Attempt a payment
         authorisationAttempt = checkoutManager.Payment.AuthorizePayment(paymentMethod.Key, args);

    Any help is much appreciated.

    Thanks !


  • Puck Holshuijsen 184 posts 727 karma points
    Oct 05, 2017 @ 13:14
    Puck Holshuijsen

    Maybe it's nothing, but I notice that you write MerchantAccountId, while the others have a lowercase first...

    Also, you set the MerchantAccountId inside your TransactionRequest, shouldn't you set the Id in there?


  • Alex 2 posts 72 karma points
    Oct 05, 2017 @ 13:27

    Hi Puck,

    Thanks for checking my post, I've just tried but didn't work.

  • Puck Holshuijsen 184 posts 727 karma points
    Oct 05, 2017 @ 13:34
    Puck Holshuijsen

    hmmm too bad.

    I never used braintree, so I can't help you with that. I just noticed those little things :)


  • Trevor Loader 199 posts 256 karma points
    Feb 27, 2018 @ 00:43
    Trevor Loader

    Hi Alex,

    I need to do the same for a client. Did you ever figure this out?

    Cheers, Trevor

Please Sign in or register to post replies

Write your reply to: