Get Vendor Plan From Order Using Api

Hello,

I'm trying to send to an external payment gateway the vendor's share from the current order. We have vendors who are not commissioned so they get the full payment of the orders while others who pay a commission per order based on their chosen plans. However from the API I can only get the company_id but not the plan or share of the vendor. Even in get specific vendor there is no field for the vendor plan.

Is there a way for me to figure out how much from the current order the vendor will get through the API?

Even in get specific vendor there is no field for the vendor plan.

Did you check it or this is your assumption? It is not documented, but the vendor plan should be returned in this method

Did you check it or this is your assumption? It is no documented, but the vendor plan should be returned in this method

I don't have the capabilities to test the API I can only rely on the guide so that I can rely the information to the external gateway company that currently doesn't cater for vendors at payment only the invoice value with no clues on the vendors and their share of the invoice.

Long story short I'm trying to get the information of what the API can return to help them customize their addon for Multivendor

From the guide these are the vendor fields available for the Get a Specific Vendor request [attachment=15191:vendor fields.png]

However, as I looked over the guide again it seems that there is a commission field that shows the amount of commission and the commission type but that's in create and update vendor not in Get a Specific Vendor.

vendor fields.png

Did you check it or this is your assumption? It is no documented, but the vendor plan should be returned in this method

I printed the order info object for an order for a commission based vendor where we take a value of 1.5 from each order and for this order the total is 3 + 1 for shipping but nothing about the amount of the commission is mentioned as attached --> [attachment=15196:output.txt]

output.txt

I printed the order info object for an order for a commission based vendor where we take a value of 1.5 from each order and for this order the total is 3 + 1 for shipping but nothing about the amount of the commission is mentioned as attached --> attachicon.gif output.txt

You cannot find it in the order data. I meant plan_id in the get vendor method

https://docs.cs-cart.com/latest/developer_guide/api/entities/vendors.html#get-a-specific-vendor

The way things work, the order (as @ecom states) has a plan-id within the order. This id is used to reference the "current" plan and from that you can get the commission amount (percent or value). However, if the "plan" has changed, an older order may reference an inaccurate commission amount and other details.

If one assumes that an order IS the contract between buyer, seller and merchant, then the commission amounts used SHOULD BE within the order.

A little history: In early cs-cart 2.0, products were "referenced" from the orders and as prices changed, caused significant confusion about what was bought when and for what amount. They then started including product data within the order as it existed at the time of order.

The way things work, the order (as @ecom states) has a plan-id within the order. This id is used to reference the "current" plan and from that you can get the commission amount (percent or value). However, if the "plan" has changed, an older order may reference an inaccurate commission amount and other details.

If one assumes that an order IS the contract between buyer, seller and merchant, then the commission amounts used SHOULD BE within the order.

A little history: In early cs-cart 2.0, products were "referenced" from the orders and as prices changed, caused significant confusion about what was bought when and for what amount. They then started including product data within the order as it existed at the time of order.

I agree with you. But we have what we have

Thank you for your help, considering that we only need it at the time the order is placed hopefully no future confusion will occur