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...
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
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.