Creating order lines

With the function $Afterpay->create_order_line you can send the specification of the order lines.

You can use this for any type of orderline, i.e.:

  • products
  • shipping fee
  • service fee
  • discount

Note: prices are to be submitted in cents, including TAX.

Below is an example of an orderline for a product.

$sku = 'PRODUCT-001';
$name = 'Product name 1';
$qty = 3;
$price = 3000; // in cents, including TAX (for discounts, use a negative number)
$tax_category = 1; // 1 = high, 2 = low, 3, zero, 4 no tax
$Afterpay->create_order_line( $sku, $name, $qty, $price, $tax_category );