Integration and Testing

Authorize.Net API questions and help with your payment integration.

Posts: 4
Registered: ‎10-26-2018

C# Sandbox Auto-Receipt problem with filling up fields.

[ Edited ]

Hello, I am currently trying to integrate eCheck payment into my C# ASP.NET website. I am able to send in the eCheck and it appeared in the sandbox account's transaction history. But when I check the auto-receipt sent to my email


Here are my codes for Page_Load in Default.aspx:


   const string ApiLoginID = "******";
            const  string ApiTransactionKey = "******";

            const string transactionId = "2249735976";

            const string payerId = "********";

            const string customerProfileId = "213213";
            const string customerPaymentProfileId = "2132345";
            const string shippingAddressId = "1223213";


            const decimal amount = 1999.34m;
            const string subscriptionId = "1223213";
            const short day = 45;
            const string emailId = "";

            ANetApiResponse response = 
            DebitBankAccount.Run(ApiLoginID, ApiTransactionKey, amount);




         public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, decimal Amount)
            const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
            const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
            ServicePointManager.SecurityProtocol = Tls12;

            Console.WriteLine("Debit Bank Account Transaction");

            ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

            ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
                name = ApiLoginID,
                ItemElementName = ItemChoiceType.transactionKey,
                Item = ApiTransactionKey

            Random rand = new Random();
            int randomAccountNumber = rand.Next(10000, int.MaxValue);

            var bankAccount = new bankAccountType
                accountType = bankAccountTypeEnum.checking,
                routingNumber = "125008547",
                accountNumber = randomAccountNumber.ToString(),
                nameOnAccount = "Bryan Toh",
                echeckType = echeckTypeEnum.WEB,   
                bankName = "DBS Bank",


            var paymentType = new paymentType { Item = bankAccount };

            var transactionRequest = new transactionRequestType
                transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),    // refund type
                payment = paymentType,
                amount = Amount

            var request = new createTransactionRequest { transactionRequest = 
            transactionRequest };

            var controller = new createTransactionController(request);

            var response = controller.GetApiResponse();

Currently, in the auto receipt, there is a lot of information missing and I've been trying to look for codes that can fit everything in but sadly I'm stuck and couldn't find out much. 


Here are the pictures of the auto receipt:






Please help! I really need to fill in all/most of the information. Thank you for your help and guidance.

Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: C# Sandbox Auto-Receipt problem with filling up fields.

Hi @Bryan1908,


If you are looking for the missing Cutomer Billing Information & Customer Shipping Information, as you are using customer Payment profile and Shipping address to charge, those information should be present on the Customer Payment profile and the Shipping Address.


If you are looking for the InvoiceNumber, you need to send that with the request.

If you can be more specific on what information you are looking in the receipt and what code you are trying to update thos fields, we will be able to help better.


Hope this Helps!