question

ben-m avatar image
ben-m asked David Marginian Deactivated commented

Shipping fees missing from e-commerce total

Hi,


I'm working on a gateway right now and I'm having some issues with the e-commerce API. The idea is to create a solution that requires as little permissions as possible, and avoid needing more than the basic service plan for this portion of the gateway.


It clearly states in the e-commerce order creation that it accepts 3 types of items: sku, shipping and tax, but the shipping fee is not being calculated nor displayed in the order total.

It also refuses tax items on order creation ( I have questions about this, should I create another question? For the time being I'm doing tax included, but it's far from ideal to me. )


As an example, here's an order ( all 3 sku items and shipping item are tax included);


  • SKU Hoodie with Logo x 1 $51.74

  • SKU Beanie x 1 $20.70

  • SKU T-Shirt x 3 $62.09

  • Shipping $5.75


The order call to the e-commerce create order:

{
  "items": [
    {
      "type": "sku",
      "amount": 5174,
      "description": "Hoodie with Logo x 1",
      "currency": "cad",
      "quantity": 1
    },
    {
      "type": "sku",
      "amount": 6209,
      "description": "T-Shirt x 3",
      "currency": "cad",
      "quantity": 1
    },
    {
      "type": "sku",
      "amount": 2070,
      "description": "Beanie x 1",
      "currency": "cad",
      "quantity": 1
    },
    {
      "type": "shipping",
      "amount": 575,
      "description": "shipping",
      "currency": "cad",
      "quantity": 1
    }
  ],
  "currency": "cad",
  "email": "REDACTED",
  "shipping": {
    "address": {
      "city": "REDACTED",
      "country": "CA",
      "line1": "123 Newsetup road",
      "line2": "Unit #5",
      "postal_code": "REDACTED",
      "state": "QC"
    },
    "name": "Ben M",
    "phone": "REDACTED"
  }
} 


Clover's response:

{
    "id": "REDACTED",
    "object": "order",
    "amount": 14028,
    "currency": "cad",
    "created": 1603730421000,
    "customer": "REDACTED",
    "email": "REDACTED",
    "items": [
        {
            "type": "sku",
            "quantity": 1,
            "amount": 5174,
            "currency": "cad",
            "description": "Hoodie with Logo x 1"
        },
        {
            "type": "sku",
            "quantity": 1,
            "amount": 6209,
            "currency": "cad",
            "description": "T-Shirt x 3"
        },
        {
            "type": "sku",
            "quantity": 1,
            "amount": 2070,
            "currency": "cad",
            "description": "Beanie x 1"
        },
        {
            "type": "shipping",
            "quantity": 1,
            "amount": 575,
            "currency": "cad",
            "description": "shipping"
        },
        {
            "type": "tax",
            "description": "Taxes (included)"
        }
    ],
    "shipping": {
        "name": "Ben M",
        "phone": "REDACTED",
        "address": {
            "line1": "123 Newsetup road",
            "line2": "Unit #5",
            "city": "REDACTED",
            "state": "QC",
            "postal_code": "REDACTED",
            "country": "CA"
        }
    },
    "status": "created"
} 

In the merchant's Orders, the total shows as $140.28


But on the receipt...



So the order creates with 14028, but somehow the total only comes to this amount, minus the shipping item. (14028 - 575 = 13453)

To top it off, it shows as a split payment. Can somebody explain how it's a split payment when the amount paid exceeds the total?

Orderse-commerce apiTaxes
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

This doesn't seem right. We have a few outstanding issues for web receipts and it looks like this is another one. I will write this up.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community