Creating a Shipment with Third Party Billing

UPS

Third party billing to another UPS account number:

<?php
$shipment = new \RocketShipIt\Shipment('UPS');

$shipment->setParameter('toCompany', 'John Doe');
$shipment->setParameter('toPhone', '1231231234');
$shipment->setParameter('toAddr1', '111 W Legion');
$shipment->setParameter('toCity', 'Whitehall');
$shipment->setParameter('toState', 'MT');
$shipment->setParameter('toCode', '59759');

$shipment->setParameter('billThirdParty', true);
$shipment->setParameter('thirdPartyAccount', '123'); // UPS Account Number Goes Here
$shipment->setParameter('thirdPartyPostalCode', '59759');
$shipment->setParameter('thirdPartyCountryCode', 'US');

$package = new \RocketShipIt\Package('UPS');
$package->setParameter('length','5');
$package->setParameter('width','5');
$package->setParameter('height','5');
$package->setParameter('weight','5');

$shipment->addPackageToShipment($package);

$response = $shipment->submitShipment();

Bill Receiver:

<?php
$shipment = new \RocketShipIt\Shipment('UPS');

$shipment->setParameter('toCompany', 'John Doe');
$shipment->setParameter('toPhone', '1231231234');
$shipment->setParameter('toAddr1', '111 W Legion');
$shipment->setParameter('toCity', 'Whitehall');
$shipment->setParameter('toState', 'MT');
$shipment->setParameter('toCode', '59759');

$shipment->setParameter('billReceiver', true);
$shipment->setParameter('receiverAccount', '123457');

$package = new \RocketShipIt\Package('UPS');
$package->setParameter('length','5');
$package->setParameter('width','5');
$package->setParameter('height','5');
$package->setParameter('weight','5');

$shipment->addPackageToShipment($package);

$response = $shipment->submitShipment();

Bill Receiver Duties and Taxes Only:

<?php
$shipment = new \RocketShipIt\Shipment('UPS');

$shipment->setParameter('toCompany', 'ACOA Head Office');
$shipment->setParameter('toName', 'Mark Sanborn');
$shipment->setParameter('toAttentionName', 'Mark Sanborn');
$shipment->setParameter('toPhone', '17077262676');
$shipment->setParameter('toAddr1', '644 Main Street');
$shipment->setParameter('toCity', 'Moncton');
$shipment->setParameter('toState', 'NB');
$shipment->setParameter('toCode', 'E1C9J8');
$shipment->setParameter('toCountry', 'CA');

$shipment->setParameter('shipPhone', '17077262676');
$shipment->setParameter('monetaryValue', '45');
$shipment->setParameter('service', '65');

// Bill receiver duties and taxes only
$shipment->setParameter('billDutiesAccountNumber', '1234');
$shipment->setParameter('billDutiesPostalCode', 'E1C9J8');
$shipment->setParameter('billDutiesCountryCode', 'CA');

$package = new \RocketShipIt\Package('UPS');
$package->setParameter('length','5');
$package->setParameter('width','5');
$package->setParameter('height','5');
$package->setParameter('weight','5');

$shipment->addPackageToShipment($package);

$response = $shipment->submitShipment();

FedEx

Third party billing to another FedEx account number:

<?php
$shipment = new \RocketShipIt\Shipment('fedex');

$shipment->setParameter('toCompany', 'John Doe');
$shipment->setParameter('toName', 'John Doe');
$shipment->setParameter('toPhone', '1231231234');
$shipment->setParameter('toAddr1', '111 W Legion');
$shipment->setParameter('toCity', 'Whitehall');
$shipment->setParameter('toState', 'MT');
$shipment->setParameter('toCode', '59759');

$shipment->setParameter('length', '5');
$shipment->setParameter('width', '5');
$shipment->setParameter('height', '5');
$shipment->setParameter('weight','5');

$shipment->setParameter('paymentType', 'THIRD_PARTY');
$shipment->setParameter('thirdPartyAccount', '123');

$response = $shipment->submitShipment();

Set different FedEx account number for customs duties payment:

$shipment->setParameter('customsAccountNumber', '123456789');

Bill duty to recipient:

<?php
$shipment = new \RocketShipIt\Shipment('FedEx');

$shipment->setParameter('toCompany', 'ACOA Head Office');
$shipment->setParameter('toName', 'Mark Sanborn');
$shipment->setParameter('toAttentionName', 'Mark Sanborn');
$shipment->setParameter('toPhone', '17077262676');
$shipment->setParameter('toAddr1', '644 Main Street');
$shipment->setParameter('toCity', 'Moncton');
$shipment->setParameter('toState', 'NB');
$shipment->setParameter('toCode', 'E1C9J8');
$shipment->setParameter('toCountry', 'CA');

$shipment->setParameter('length', '5');
$shipment->setParameter('width', '5');
$shipment->setParameter('height', '5');
$shipment->setParameter('weight','5');

$shipment->setParameter('customsPaymentType', 'RECIPIENT');
$shipment->setParameter('customsCurrency', 'USD');
$shipment->setParameter('customsValue', '20.00');

$response = $shipment->submitShipment();

DHL

Third party duty billing:

<?php
$shipment->setParameter('dutyPaymentType', 'T'); // S:Shipper, R:Recipient, T:Third Party.
$shipment->setParameter('dutyAccountNumber', '1234599');

Bill duty to recipient:

<?php
$shipment->setParameter('dutyPaymentType', 'R'); // S:Shipper, R:Recipient, T:Third Party.

Third shipment billing:

<?php
$shipment->setParameter('billThirdParty', true);
$shipment->setParameter('thirdPartyAccount', '803921577');