UPS Bill to Third Party Shipper?

I'm trying to figure out how to bill a third party UPS Shipper Account Number using the API, When I try what I have listed below it doesn't work! It says "A single billing option is required per shipment" in the error message. Anyone have any idea whats wrong?

$ShipmentConfirmRequestXML->push('PaymentInformation'); $ShipmentConfirmRequestXML->push('Prepaid'); $ShipmentConfirmRequestXML->push('BillThirdParty'); $ShipmentConfirmRequestXML->element('AccountNumber', 'XXXXX'); $ShipmentConfirmRequestXML->pop(); // end BillShipper $ShipmentConfirmRequestXML->pop(); // end Prepaid $ShipmentConfirmRequestXML->pop(); // end PaymentInformation 
0

1 Answer

Third party billing is not within the Prepaid container. The end result XML should look something like this, based on the UPS API developers guide:

<PaymentInformation> <BillThirdParty> <BillThirdPartyShipper> <AccountNumber>ABC123</AccountNumber> <ThirdParty> <Address> <PostalCode>12345-6789</PostalCode> <CountryCode>US</CountryCode> </Address> </ThirdParty> </BillThirdPartyShipper> </BillThirdParty> </PaymentInformation> 

For some reason, the UPS API will always fail with third party billing in test mode, giving a Transient 120001 error, "XML Shipping System is unavailable, please try again later". Switching off test mode fixes the problem - just void the shipment after you've confirmed your code works.

Also, if you ever enter an incorrect account code for third party billing, the same 120001 error will be returned.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like