经过多次反复试验,我找到了隐藏的解决方案船运在电子邮件发票中。此解决方案间接将发票中的(不可配置的)category_code 从 '航运' 至 '服务'。
Invoicing API documentation 显示一个用于运送的数组。在我所有的测试中,发送没有税和没有运输数组的请求,API 响应失败,声明“无法解析”。请注意,以下不包含运费。
在 API 请求的(必需)amount 组中,具有以下信息,现已解决此问题。
'amount' =>
array (
'breakdown' =>
array (
'item_total' =>
array (
'currency_code' => 'USD',
'value' => '14.00', // <- calculate
),
'discount' =>
array (
'invoice_discount' =>
array (
'amount' =>
array (
'currency_code' => 'USD',
'value' => '0.00', // <- calculate (for invoice)
),
),
'item_discount' =>
array (
'currency_code' => 'USD',
'value' => '0.00', // <- calculate (for each item)
),
),
'tax_total' =>
array (
'currency_code' => 'USD',
'value' => '0.00', // <- calculate
),
),
'currency_code' => 'USD',
'value' => '14.00', // <- calculate
),