The options that EasyPost offers for third-party billing are outlined below. You'd want to use the Payment object within your Shipment options to specify billing for postage.
- TYPE: Supported values are "SENDER", "THIRD_PARTY", "RECEIVER", "COLLECT". Defaults to SENDER.
- ACCOUNT: This is the FedEx or DHL Express account number to be billed. Required for RECEIVER and THIRD_PARTY.
- COUNTRY: This is the country code that the account is based in. Required for THIRD_PARTY.
- POSTAL_CODE: This is the postal code that the account is based in. Required for RECEIVER and THIRD_PARTY.
You'd want to use:
shipment[options][duty_payment_account]
for FedEx and DHL Express with duties and taxes being billed to a third party, and specify the account number to pay duties, along with the incoterm 'DDP'.
Here is a JSON example of how you'd set that up:
options: { payment: { type: "THIRD_PARTY", account: "123456789", country: "US", postal_code: "84123" } duty_payment_account: "123456789", incoterm: "DDP" }