How to Combine Payments using AddOrder and SendInvoice How to use Add Order and Send Invoice
This article describes how to test Add Order and Send Invoice for combined payments. The example here uses flat rate shipping services.
1. Create two items with flat rate shipping services. See Template 1 for a sample AddItem call. This template offers two flat rate shipping options, optional insurance, and sales tax for the state of California.
2. Purchase both items with the same buyer and use a shipping address from the state of California.
3. You will notice that when you call GetItemTransactions for each of these items, there will be a default shipping service selected populated. This is done in case the buyer does not select a service.
4. Now you can create a Seller Order to combine both items together. When creating the order, you need to re-specify the following information based on the combined items. Think of this step as created a new package, which contains all the items of the order. You need to re-specify details related to shipping, insurance and tax.
a. Shipping Options: You will need to re-specify shipping options for the order, which represent the shipping cost for all the items of the order. The shipping service cost should represent the cost to ship all items, and the additional shipping cost does not apply any more.
b. Tax: You will need to re-specify text for the order, which represent the tax amount for all the items of the order. When calculating the tax, make sure that the tax state matches that of the Shipping Address state.
c. Insurance: You will need to re-specify the insurance amount of the order, which represents the insurance amount for the entire order.
d. Payment Options: You can revise any payment options you wish to offer to the buyer.
e. Total Amount: You must enter the total amount for the transaction which includes the cost of the items plus shipping, tax and insurance.
f. Subtotal Amount: Enter the subtotal, which includes only the cost of the items
5. Once the order is created, the new values you have set will be displayed to a user when they go through eBay Checkout flow. Based on the shipping option selected by the user, the <ShippingServiceSelected> value will be updated to reflect the shipping service chosen by the buyer. Please note that eBay sets the <ShippingServiceSelected> to the Priority 1 shipping service by default, in case it is never set by the buyer.
6. If all the values in the order are correct, you can call Send Invoice, with only the Order ID. This will generate an invoice with all the current settings. SendInvoice does not support any additional parameters when used for Orders. Therefore all the information represented in the Invoice will be taken from the Order.