cancel
Showing results for 
Search instead for 
Did you mean: 

Python SDK: how to set billTo fields

None of the code samples at

 

https://github.com/AuthorizeNet/sample-code-python/tree/master/PaymentTransactions

 

Demonstrate setting "billTo" fields.

 

How do I use the python SDK to send billing address information for verification?

 

 

For example: how would I send the customer's zip code so that I receive an error message if it's wrong?

superseed
Member
2 REPLIES 2

Hello @superseed

 

If you open an issue on GitHub, it will notify the team directly who can add the information you need.

 

Richard

RichardH
Administrator Administrator
Administrator

Hi @superseed,

 

I'm not quite a Python expert, so I may have missed something here, but try this:

 

 

    // Set the customer's Bill To address
      
billTo = apicontractsv1.customerAddressType();
billTo.firstName("Ellen");
billTo.lastName("Johnson");
billTo.company("Souveniropolis");
billTo.address("14 Main Street");
billTo.city("Pecan Springs");
billTo.state("TX");
billTo.zip("44628");
billTo.country("USA");
// add the last line to add the billTo to the transactionrequest transactionrequest = apicontractsv1.transactionRequestType() transactionrequest.transactionType = "authCaptureTransaction" transactionrequest.amount = amount transactionrequest.payment = payment
transactionrequest.billTo = billTo

 

I'd still encourage you to open an issue in the sample code repository on GitHub so that the relevant people can be notified to add examples to each of the samples.