บทความเกี่ยวกับ: BentoWeb API

การคำนวนท้ายบิล Marketplace

Shopee

วิธีคำนวนรายได้ของร้าน (ยอดที่ Shopee ชำระกลับเข้ามา) อัพเดทเมื่อ 8 ตุลาคม 2567 โดยข้อมูลจะอยู่ใน API Order เส้น /order/order-full/{order_id} Field shopee_api_transaction


escrow_amount = original_cost_of_goods_sold-original_shopee_discount+seller_return_refund+ shopee_discount- voucher_from_seller- seller_coin_cash_back+ buyer_paid_shipping_fee- actual_shipping_fee+ shopee_shipping_rebate+ shipping_fee_discount_from_3pl- reverse_shipping_fee+ rsf_seller_protection_fee_claim_amount- final_return_to_seller_shipping_fee- seller_transaction_fee- service_fee- commission_fee- campaign_fee- shipping_seller_protection_fee_amount- delivery_seller_protection_fee_premium_amount-final_escrow_product_gst- order_ams_commission_fee- escrow_tax-sales_tax_on_lvg-reverse_shipping_fee_sst-shipping_fee_sst-withholding_tax-overseas_return_service_fee-vat_on_imported_goods


อ้างอิง: https://open.shopee.com/documents/v2/v2.payment.get_escrow_detail?module=97&type=1


ตัวอย่างข้อมูล


{
    "order_shopee_api": [
        {
            "id": 123456789,
            "store_id": 11111,
            "ordersn": "2410094XXXXXXX",
            "buyer_username": "****",
            "recipient_address": {
                "name": "พ******ร",
                "phone": "******62",
                "town": "",
                "district": "ตำบลหัวหิน",
                "city": "อำเภอหัวหิน",
                "state": "จังหวัดประจวบคีรีขันธ์",
                "region": "TH",
                "zipcode": "77110",
                "full_address": "******14, ตำบลหัวหิน, อำเภอหัวหิน ตำบลหัวหิน อำเภอหัวหิน จังหวัดประจวบคีรีขันธ์ 77110"
            },
            "cod": false,
            "payment_method": "Credit Card/Debit Card",
            "create_time": "2024-10-09 15:31:00",
            "update_time": "2024-10-09 15:31:05",
            "total_amount": "410.00",
            "country": "TH",
            "shipping_carrier": "SPX Express - FS",
            "raw_body": {
                "actual_shipping_fee": 0,
                "actual_shipping_fee_confirmed": false,
                "advance_package": false,
                "booking_sn": "",
                "buyer_cancel_reason": "",
                "buyer_user_id": 123456789,
                "buyer_username": "****",
                "cancel_by": "",
                "cancel_reason": "",
                "checkout_shipping_carrier": "Fast Shipping - ส่งเร็วในประเทศ",
                "cod": false,
                "create_time": 1728462660,
                "currency": "THB",
                "days_to_ship": 2,
                "dropshipper": null,
                "dropshipper_phone": null,
                "estimated_shipping_fee": 38,
                "goods_to_declare": false,
                "item_list": [
                    {
                        "item_id": 17042546821,
                        "item_name": "[New] item_name",
                        "item_sku": "",
                        "model_id": 178001852425,
                        "model_name": "ธรรมดา",
                        "model_sku": "",
                        "model_quantity_purchased": 1,
                        "model_original_price": 495,
                        "model_discounted_price": 495,
                        "wholesale": false,
                        "weight": 0.16,
                        "add_on_deal": false,
                        "main_item": false,
                        "add_on_deal_id": 0,
                        "promotion_type": "",
                        "promotion_id": 0,
                        "order_item_id": 17042546821,
                        "promotion_group_id": 0,
                        "image_info": {
                            "image_url": "https://cf.shopee.co.th/file/****"
                        },
                        "product_location_id": [
                            "THZ"
                        ],
                        "is_prescription_item": false,
                        "is_b2c_owned_item": false
                    }
                ],
                "message_to_seller": "",
                "order_sn": "2410094XXXXXXX",
                "order_status": "READY_TO_SHIP",
                "package_list": [
                    {
                        "package_number": "OFG182161860249653",
                        "group_shipment_id": null,
                        "logistics_status": "LOGISTICS_READY",
                        "shipping_carrier": "SPX Express - FS",
                        "item_list": [
                            {
                                "item_id": 17042546821,
                                "model_id": 178001852425,
                                "model_quantity": 1,
                                "order_item_id": 17042546821,
                                "promotion_group_id": 0,
                                "product_location_id": "THZ"
                            }
                        ],
                        "parcel_chargeable_weight_gram": 0
                    }
                ],
                "pay_time": 1728462665,
                "payment_method": "Credit Card/Debit Card",
                "recipient_address": {
                    "name": "พ******ร",
                    "phone": "******62",
                    "town": "",
                    "district": "ตำบลหัวหิน",
                    "city": "อำเภอหัวหิน",
                    "state": "จังหวัดประจวบคีรีขันธ์",
                    "region": "TH",
                    "zipcode": "77110",
                    "full_address": "******14, ตำบลหัวหิน, อำเภอหัวหิน ตำบลหัวหิน อำเภอหัวหิน จังหวัดประจวบคีรีขันธ์ 77110"
                },
                "region": "TH",
                "reverse_shipping_fee": 0,
                "ship_by_date": 1728579599,
                "shipping_carrier": "SPX Express - FS",
                "split_up": false,
                "total_amount": 410,
                "update_time": 1728462665
            },
            "created_at": "2024-10-09 15:31:12",
            "updated_at": "2024-10-09 15:31:13",
            "order_id_bentoweb": 123456789,
            "message_to_seller": "",
            "estimated_shipping_fee": "38.00",
            "currency": "THB",
            "create_bentoweb_row": 1,
            "loop": null,
            "order_item_shopee_api": [
                {
                    "id": 1131494,
                    "order_shopee_id": "2410094XXXXXXX",
                    "weight": "0.16",
                    "item_name": "[New] item_name",
                    "is_wholesale": 0,
                    "promotion_type": "",
                    "item_sku": "",
                    "variation_discounted_price": "495.00",
                    "variation_id": 178001852425,
                    "variation_name": "ธรรมดา",
                    "is_set_item": 0,
                    "is_add_on_deal": 0,
                    "item_id": 17042546821,
                    "promotion_id": 0,
                    "add_on_deal_id": 0,
                    "variation_quantity_purchased": 1,
                    "variation_sku": "",
                    "variation_original_price": "495.00",
                    "is_main_item": 0,
                    "created_at": "2024-10-09 15:31:13",
                    "updated_at": "2024-10-09 15:31:13",
                    "create_bentoweb_row": 1,
                    "order_item_id_bentoweb": 123456000,
                    "group_id": "0"
                }
            ]
        }
    ],
    "shopee_api_transaction": {
        "id": 814703,
        "ordersn": "2410094XXXXXXX",
        "order_id_bentoweb": 123456789,
        "created_at": "2024-10-09 15:31:13",
        "updated_at": "2024-10-10 12:33:49",
        "deleted_at": null,
        "raw_body_backup": "",
        "store_id": 11111,
        "raw_body_my_income": null,
        "disable_fetch_retry": 0,
        "raw_body": {
            "buyer_payment_info": {
                "buyer_payment_method": "Credit Card/Debit Card",
                "buyer_service_fee": 0,
                "buyer_tax_amount": 0,
                "buyer_total_amount": 410,
                "credit_card_promotion": 0,
                "icms_tax_amount": 0,
                "import_tax_amount": 0,
                "initial_buyer_txn_fee": 0,
                "insurance_premium": 0,
                "iof_tax_amount": 0,
                "is_paid_by_credit_card": true,
                "merchant_subtotal": 495,
                "seller_voucher": -3,
                "shipping_fee": 38,
                "shipping_fee_sst_amount": 0,
                "shopee_coins_redeemed": 0,
                "shopee_voucher": -120
            },
            "buyer_user_name": "****",
            "order_income": {
                "actual_shipping_fee": 38,
                "buyer_paid_shipping_fee": 38,
                "buyer_payment_method": "Credit Card/Debit Card",
                "buyer_total_amount": 410,
                "buyer_transaction_fee": 0,
                "campaign_fee": 0,
                "coins": 0,
                "commission_fee": 37,
                "cost_of_goods_sold": 495,
                "credit_card_promotion": 0,
                "credit_card_transaction_fee": 17,
                "cross_border_tax": 0,
                "delivery_seller_protection_fee_premium_amount": 0,
                "drc_adjustable_refund": 0,
                "escrow_amount": 406,
                "escrow_amount_after_adjustment": 406,
                "escrow_tax": 0,
                "estimated_shipping_fee": 38,
                "final_escrow_product_gst": 0,
                "final_escrow_shipping_gst": 0,
                "final_product_protection": 0,
                "final_product_vat_tax": 0,
                "final_return_to_seller_shipping_fee": 0,
                "final_shipping_fee": -38,
                "final_shipping_vat_tax": 0,
                "fsf_seller_protection_fee_claim_amount": 0,
                "instalment_plan": "N/A",
                "items": [
                    {
                        "activity_id": 0,
                        "activity_type": "",
                        "ams_commission_fee": 0,
                        "discount_from_coin": 0,
                        "discount_from_voucher_seller": 3,
                        "discount_from_voucher_shopee": 120,
                        "discounted_price": 495,
                        "is_b2c_shop_item": false,
                        "is_main_item": false,
                        "item_id": 17042546821,
                        "item_name": "[New] item_name",
                        "item_sku": "",
                        "model_id": 178001852425,
                        "model_name": "ธรรมดา",
                        "model_sku": "",
                        "original_price": 495,
                        "quantity_purchased": 1,
                        "seller_discount": 0,
                        "selling_price": 495,
                        "shopee_discount": 0
                    }
                ],
                "order_ams_commission_fee": 0,
                "order_chargeable_weight": 0,
                "order_discounted_price": 495,
                "order_original_price": 495,
                "order_seller_discount": 0,
                "order_selling_price": 495,
                "original_cost_of_goods_sold": 495,
                "original_price": 495,
                "original_shopee_discount": 0,
                "overseas_return_service_fee": 0,
                "payment_promotion": 0,
                "prorated_coins_value_offset_return_items": 0,
                "prorated_payment_channel_promo_bank_offset_return_items": 0,
                "prorated_payment_channel_promo_shopee_offset_return_items": 0,
                "prorated_seller_voucher_offset_return_items": 0,
                "prorated_shopee_voucher_offset_return_items": 0,
                "reverse_shipping_fee": 0,
                "reverse_shipping_fee_sst": 0,
                "rsf_seller_protection_fee_claim_amount": 0,
                "sales_tax_on_lvg": 0,
                "seller_coin_cash_back": 0,
                "seller_discount": 0,
                "seller_lost_compensation": 0,
                "seller_return_refund": 0,
                "seller_shipping_discount": 0,
                "seller_transaction_fee": 17,
                "seller_voucher_code": [
                    "SFP-982163659976704"
                ],
                "service_fee": 32,
                "shipping_fee_discount_from_3pl": 0,
                "shipping_fee_sst": 0,
                "shipping_seller_protection_fee_amount": 0,
                "shopee_discount": 0,
                "shopee_shipping_rebate": 0,
                "total_adjustment_amount": 0,
                "vat_on_imported_goods": 0,
                "voucher_from_seller": 3,
                "voucher_from_shopee": 120,
                "withholding_tax": 0
            },
            "order_sn": "2410094XXXXXXX",
            "return_order_sn_list": []
        },
        "loop": null
    }
}


Lazada

วิธีคำนวนรายได้ของร้าน (ยอดที่ Lazada ชำระกลับเข้ามา) อัพเดทเมื่อ 8 ตุลาคม 2567 โดยข้อมูลจะอยู่ใน API Order เส้น /order/order-full/{order_id} Field order_lazada.lazada_transaction


ให้ group ด้วย fee_name และนำค่า amount มารวมกัน


escrow_amount = Fee name [item price credit] - Fee name [อื่นๆ]


ยกตัวอย่างจากข้อมูลด้านล่าง
2403.41 = 2598-111.19-83.40


ตัวอย่างข้อมูล


"order_lazada": [
    {
        "order_id": 1234567890,
        "voucher": "0.00",
        "warehouse_code": "dropshipping",
        "order_number": 1234567890,
        "created_at": "2024-10-06 14:56:39 +0700",
        "voucher_code": "",
        "voucher_platform": "0.00",
        "gift_option": "0",
        "customer_last_name": "",
        "updated_at": "2024-10-06 14:57:20 +0700",
        "promised_shipping_times": "",
        "price": "2598.00",
        "national_registration_number": "",
        "payment_method": "VIRTUAL_ACCOUNT",
        "payment_datetime": "2024-10-06 14:57:09",
        "customer_first_name": "REDACTED",
        "shipping_fee": "29.00",
        "voucher_seller": null,
        "branch_number": "",
        "tax_code": "",
        "items_count": 1,
        "delivery_info": "",
        "statuses": "pending",
        "address_billing_country": "Thailand",
        "address_billing_address3": "REDACTED",
        "address_billing_address2": "",
        "address_billing_city": "REDACTED",
        "address_billing_phone": "REDACTED",
        "address_billing_address1": "REDACTED",
        "address_billing_post_code": "REDACTED",
        "address_billing_phone2": "",
        "address_billing_last_name": "",
        "address_billing_address5": "REDACTED",
        "address_billing_address4": "REDACTED",
        "address_billing_first_name": "REDACTED",
        "extra_attributes": "{\"TaxInvoiceRequested\":false}",
        "gift_message": "",
        "remarks": "",
        "address_shipping_country": "Thailand",
        "address_shipping_address3": "REDACTED",
        "address_shipping_address2": "",
        "address_shipping_city": "REDACTED",
        "address_shipping_phone": "REDACTED",
        "address_shipping_address1": "REDACTED",
        "address_shipping_post_code": "REDACTED",
        "address_shipping_phone2": "",
        "address_shipping_last_name": "",
        "address_shipping_address5": "REDACTED",
        "address_shipping_address4": "REDACTED",
        "address_shipping_first_name": "REDACTED",
        "bentoweb_created_at": "2024-10-06 14:57:24",
        "bentoweb_updated_at": "2024-10-06 14:57:27",
        "create_bentoweb_row": 1,
        "order_id_bentoweb": 1111,
        "shipping_label": {
            "document": {
                "pdf_url": "lazada/shipping-label/2b308686b0ac6bfe692cf89a78d3f661.pdf"
            }
        },
        "invoice_label": null,
        "raw_body": "REDACTED",
        "store_id": 1111,
        "loop": null,
        "order_item_lazada": [
            {
                "order_item_id": 1234567890123456,
                "order_id": 1234567890,
                "paid_price": "2598.00",
                "product_main_image": "REDACTED",
                "tax_amount": "0.00",
                "voucher_platform": "0.00",
                "reason": "",
                "sla_time_stamp": "2024-10-08T23:59:59+07:00",
                "product_detail_url": "REDACTED",
                "promised_shipping_time": "",
                "warehouse_code": "dropshipping",
                "purchase_order_id": 0,
                "voucher_seller": "0.00",
                "shipping_type": "Dropshipping",
                "created_at": "2024-10-06 14:56:39 +0700",
                "voucher_code": "",
                "package_id": "FP020112706084011",
                "variation": 0,
                "wallet_credits": "0.00",
                "updated_at": "2024-10-06 14:57:20 +0700",
                "purchase_order_number": 0,
                "currency": "THB",
                "shipping_provider_type": "standard",
                "sku": "4894189636-169691663",
                "invoice_number": "",
                "order_type": "Normal",
                "cancel_return_initiator": "null-null",
                "shop_sku": "4894189636_TH-20611075989",
                "is_digital": 0,
                "item_price": "2598.00",
                "shipping_service_cost": 0,
                "stage_pay_status": "",
                "tracking_code_pre": "",
                "tracking_code": "LEXPU0403306012",
                "shipping_amount": "29.00",
                "reason_detail": "",
                "shop_id": "",
                "order_flag": "NORMAL",
                "return_status": 0,
                "name": "REDACTED",
                "shipment_provider": "LEX TH",
                "voucher_amount": "0.00",
                "digital_delivery_info": "",
                "extra_attributes": "",
                "status": "pending",
                "bentoweb_created_at": "2024-10-06 14:57:24",
                "bentoweb_updated_at": "2024-10-06 14:57:40",
                "create_bentoweb_row": 1,
                "order_item_id_bentoweb": 17396826,
                "set_shipment_response": {
                    "order_item_id": 1234567890123456,
                    "msg": "success",
                    "item_err_code": "0",
                    "tracking_number": "LEXPU0403306012",
                    "shipment_provider": "LEX TH",
                    "package_id": "FP020112706084011",
                    "retry": false
                },
                "raw_body": "REDACTED"
            }
        ],
        "lazada_transaction": {
            "id": 85862,
            "order_id": 1234567890,
            "order_id_bentoweb": 1111,
            "created_at": "2024-10-08T05:11:28.000000Z",
            "updated_at": "2024-10-08T05:11:28.000000Z",
            "deleted_at": null,
            "raw_body": [
                {
                    "order_no": "1234567890",
                    "transaction_date": "08 Oct 2024",
                    "amount": "2,598.00",
                    "paid_status": "Not Paid",
                    "shipping_provider": "LEX TH",
                    "WHT_included_in_amount": "No",
                    "lazada_sku": "4894189636_TH-20611075989",
                    "fee_type": "13",
                    "transaction_type": "Orders-Sales",
                    "orderItem_no": "1234567890123456",
                    "orderItem_status": "Delivered",
                    "reference": "1234567890123456",
                    "fee_name": "Item Price Credit",
                    "shipping_speed": "standard",
                    "WHT_amount": "0.00",
                    "transaction_number": "1234567890123456",
                    "seller_sku": "4894189636-1696916638234-0",
                    "statement": "08 Oct 2024 - 08 Oct 2024",
                    "details": "REDACTED",
                    "comment": "",
                    "VAT_in_amount": "0.00",
                    "shipment_type": "Dropshipping"
                },
                {
                    "order_no": "1234567890",
                    "transaction_date": "08 Oct 2024",
                    "amount": "-111.19",
                    "paid_status": "Not Paid",
                    "shipping_provider": "LEX TH",
                    "WHT_included_in_amount": "No",
                    "lazada_sku": "4894189636_TH-20611075989",
                    "fee_type": "298",
                    "transaction_type": "Orders-Marketing Fees",
                    "orderItem_no": "1234567890123456",
                    "orderItem_status": "Delivered",
                    "reference": "1234567890123456",
                    "fee_name": "Free Shipping Max Fee",
                    "shipping_speed": "standard",
                    "WHT_amount": "0.00",
                    "transaction_number": "1234567890123456",
                    "seller_sku": "4894189636-1696916638234-0",
                    "statement": "08 Oct 2024 - 08 Oct 2024",
                    "details": "REDACTED",
                    "comment": "",
                    "VAT_in_amount": "7.27",
                    "shipment_type": "Dropshipping"
                },
                {
                    "order_no": "1234567890",
                    "transaction_date": "08 Oct 2024",
                    "amount": "-83.40",
                    "paid_status": "Not Paid",
                    "shipping_provider": "LEX TH",
                    "WHT_included_in_amount": "No",
                    "lazada_sku": "4894189636_TH-20611075989",
                    "fee_type": "5028",
                    "transaction_type": "Orders-Lazada Fees",
                    "orderItem_no": "1234567890123456",
                    "orderItem_status": "Delivered",
                    "reference": "1234567890123456",
                    "fee_name": "LazCoins Discount Promotion Fee",
                    "shipping_speed": "standard",
                    "WHT_amount": "0.00",
                    "transaction_number": "1234567890123456",
                    "seller_sku": "4894189636-1696916638234-0",
                    "statement": "08 Oct 2024 - 08 Oct 2024",
                    "details": "REDACTED",
                    "comment": "REDACTED",
                    "VAT_in_amount": "5.46",
                    "shipment_type": "Dropshipping"
                }
            ],
            "store_id": 1111
        }
    }
]



BentoWeb


ส่วนลด แบ่งออกได้ 3 กลุ่มใหญ่ ๆ

  1. ส่วนลดสินค้า
  2. ส่วนลดเงินสด
  • อ้างอิงจากการตั้งค่าหน้าภาษี


ส่วนลดสินค้ามีอะไรบ้าง

  1. รหัสส่วนลด = order.discount
  2. Super discount  = order.super_discount
  3. ส่วนลดแต้มสะสม = order.loyalty_discount (ถ้าค่า order.loyalty_points_discount_type = p)
  4. ส่วนลดพิเศษ = order.custom_discount (ถ้าค่า order.custom_discount_type = p)


ส่วนลดเงินสดมีอะไรบ้าง

  1. ส่วนลดแต้มสะสม = order.loyalty_discount (ถ้าค่า order.loyalty_points_discount_type = c)
  2. ส่วนลดพิเศษ = order.custom_discount (ถ้าค่า order.custom_discount_type = c)


—————————————


ค่าจัดส่ง
shipping
original_shipping (ค่าจัดส่ง ก่อนถูก รหัสส่วนลดปรับเป็นฟรีค่าจัดส่ง)


ค่าบริการเพิ่มเติม
payment_fee


แจง Field รายงานการสั่งซื้อ (รายการสินค้าแนวตั้ง) [Type 22]


หัวข้อ

Value

วันที่ออกใบเสร็จรับเงิน

order.receipt_datetime

วันที่ชำระเงิน

order.payment_datetime

วันที่จัดส่งสินค้า

order.shipping_datetime

เลขที่ใบสั่งซื้อ

order.full_order_code

เลขที่ใบเสร็จรับเงิน

order.full_receipt_code

เลขที่ใบกำกับภาษี

order_billing.full_tax_invoice_code

ชื่อผู้สั่งซื้อ

order.firstname order.lastname

อีเมล

order.email

เบอร์โทรศัพท์

order.phone

ชื่อผู้รับสินค้า

order.shipping_fullname

อีเมลผู้รับสินค้า

order.shipping_email

เบอร์โทรศัพท์ผู้รับสินค้า

order.shipping_phone

ที่อยู่บรรทัดที่ 1

order.shipping_address_1

ที่อยู่บรรทัดที่ 2

order.shipping_address_2

แขวง / ตำบล

order.shipping_subdistrict

เขต / อำเภอ

order.shipping_district

จังหวัด

order.shipping_province

รหัสไปรษณีย์

order.shipping_zipcode

ที่อยู่ในการออกใบกำกับภาษี

order_billing.billing_*

เลขประจำตัวผู้เสียภาษีอากร

order_billing.billing_idcard

วิธีการชำระเงินจริง

order.payment_method_real

วิธีการจัดส่งจริง

order.shipping_method_real

Tracking

order.shipping_ems

GPS

order.shipping_gps

สถานะล่าสุด

order.order_status_id

Order From

order.order_from

Ref no.

[refNo]

References

[references FCO cart name]

Order Tag

order.order_tag[*].store_order_tag.name

Customer Tag

-customerTag-

Social channel

order.order_social.social_type

Name in Social channel

order.order_social.name

ชื่อรหัสส่วนลด

order.discount_obj.name

ยอดรวม

order.sub_total

ราคาสินค้า (แบบลดราคาก่อน VAT)

'0.00'

ส่วนลดจากรหัสส่วนลด

order.discount

Super discount

order.super_discount

ส่วนลดแต้มสะสม

order.loyalty_points_discount

ส่วนลดพิเศษ

order.custom_discount

VAT (แบบลดราคาก่อน VAT)

'0.00'

ค่าจัดส่ง

order.shipping

ค่าบริการเพิ่มเติม

order.payment_fee

ยอดรวมทั้งหมด

order.grand_total

ราคาสินค้า (แบบลดราคาหลัง VAT)

order.before_vat

VAT (แบบลดราคาหลัง VAT)

order.vat

ชื่อสินค้า

order.order_item[*].name

ชื่อตัวเลือกสินค้า

order.order_item[*].pv_name

SKU

order.order_item[*].sku

จำนวน

order.order_item[*].qty


หัวข้อ

Value

ราคา

order.order_item[*].price

อัปเดตเมื่อ: 23/07/2025

บทความนี้เป็นประโยชน์หรือไม่?

แบ่งปันความคิดเห็นของคุณ

ยกเลิก

ขอบคุณ!