This code steps you through the basics of generating a URL on-the-fly to one of BluePay's Simple Hosted Payment Forms (SHPF).

The following sample code calls a routine from our Code Library.
Download BluePay.vb
Or, download via GitHub

using System;
using BluePayLibrary;

namespace Sample
    class URLGeneratorMethod
        public static void Main()
            string accountID = "Merchant's Account ID Here";
            string secretKey = "Merchant's Secret Key Here";
            string mode = "TEST";

            BluePay testURL = new BluePay

            string generatedURL = testURL.GenerateURL
                merchantName: "Test Merchant",
                returnURL: "",
                transactionType: "SALE",
                acceptDiscover: "Yes",
                acceptAmex: "Yes",
                amount: "99.99",
                protectAmount: "Yes",
                rebilling: "Yes",
                rebProtect: "Yes",
                rebAmount: "50",
                rebCycles: "12",
                rebStartDate: "1 MONTH",
                rebFrequency: "1 MONTH",
                customID1: "MyCustomID1.1234",
                protectCustomID1: "Yes",
                customID2: "MyCustomID2.12345678910",
                protectCustomID2: "Yes",
                paymentTemplate: "mobileform01",
                receiptTemplate: "defaultres2",
                receiptTempRemoteURL: ""

            Console.WriteLine("Hosted Payment Form URL: " + generatedURL);

Can’t find what you’re
looking for? We can help.

Contact 800-350-2684 for Integration Support.

  • Microsoft Gold Partner Badge
  • Susan G. Komen for the Cure Supporter
  • 2018 American Business Awards Gold Stevie® Winner Badge for Best Payment and Electronic Commerce Solution
  • 2018 CNP Awards Customer Choice Winner Badge for Best E-Commerce Platform/Gateway
  • Best in Biz Awards 2018 Silver Winner Badge for Business Development Department of the Year
  • TSG Gateway Awards 2019 BluePay
BluePay Processing, LLC is a registered ISO of Wells Fargo Bank, N.A., Concord, CA, 94524 U.S.A.
BluePay Canada ULC, is a Registered ISO/MSP of Peoples Trust Company, Vancouver, Canada.