Tổng đài hỗ trợ - 
1900 6750
( 7:00 - 22:00 )

Refund

Một Refund là một là một bản ghi về số tiền đã trả lại cho khách hàng, và/hoặc việc trả lại bất kỳ mặt hàng nào trên một đơn đặt hàng có thể đã được bổ sung hoặc chưa được bổ sung.

Nếu bạn muốn tạo một Refund, hãy xem Transaction API.

Bạn có thể làm gì với Refund?

Sapo API cho phép bạn thực hiện các thao tác sau với tài nguyên Refund. Các phiên bản chi tiết hơn của những thao tác này có thể có:

Các thuộc tính của Refund

created_on
{ "created_on" : "2008-01-10T11:00:00Z" }

Thời gian Refund được tạo. API trả về kết quả theo định dạng chuẩn ISO 8601.

id
{ "id" : 92738740 }

Số duy nhất định danh Refund, sử dụng cho mục đích của API.

note
{ "note" : "Item was damaged during shipping" }

Lưu ý tùy chọn được gắn kèm với Refund.

refund_line_items
{ "id" : 209341123 }
{ "line_item" : {} }
{ "line_item_id" : 128323456 }
{ "quantity" : 2 }

Chi tiết về một item được hoàn trả. Các thuộc tính:

  • id: Số duy nhất định danh một line item của Refund.
  • line_item: Một line item được hoàn trả.
  • line_item_id: Id của line item.
  • quantity: Số lượng của line item được hoàn trả.
restock
{ "restock" : true }

Xác định line item có được hoàn trả về kho hay không.

transactions

Danh sách các Transaction được thực hiện cùng với Refund.

user_id
{ "user_id" : 238478920 }

Số duy nhất định danh người thực hiện Refund.

Endpoints

GET/admin/orders/450789469/refunds/509562969.json

Lấy một Refund

fields

danh sách các trường trong kết quả trả về, cách nhau bởi dấu phẩy

Lấy về một Refund

GET /admin/orders/#{id}/refunds/#{id}.json
Xem kết quả
HTTP/1.1 200 OK
{
  "refund": {
    "id": 509562969,
    "order_id": 450789469,
    "created_on": "2015-12-08T11:40:19Z",
    "note": "it broke during shipping",
    "restock": true,
    "user_id": 799407056,
    "refund_line_items": [
      {
        "id": 104689539,
        "quantity": 1,
        "line_item_id": 703073504,
        "line_item": {
          "id": 703073504,
          "variant_id": 457924702,
          "title": "IPod Nano - 8gb",
          "quantity": 1,
          "price": "199.00",
          "grams": 200,
          "sku": "IPOD2008BLACK",
          "variant_title": "black",
          "vendor": null,
          "fulfillment_service": "manual",
          "product_id": 632910392,
          "requires_shipping": true,
          
          "gift_card": false,
          "name": "IPod Nano - 8gb - black",
          "variant_inventory_management": "bizweb",
          "properties": [
          ],
          "product_exists": true,
          "fulfillable_quantity": 1,
          "total_discount": "0.00",
          "fulfillment_status": null,
          
        }
      },
      {
        "id": 709875399,
        "quantity": 1,
        "line_item_id": 466157049,
        "line_item": {
          "id": 466157049,
          "variant_id": 39072856,
          "title": "IPod Nano - 8gb",
          "quantity": 1,
          "price": "199.00",
          "grams": 200,
          "sku": "IPOD2008GREEN",
          "variant_title": "green",
          "vendor": null,
          "fulfillment_service": "manual",
          "product_id": 632910392,
          "requires_shipping": true,
          
          "gift_card": false,
          "name": "IPod Nano - 8gb - green",
          "variant_inventory_management": "bizweb",
          "properties": [
            {
              "name": "Custom Engraving Front",
              "value": "Happy Birthday"
            },
            {
              "name": "Custom Engraving Back",
              "value": "Merry Christmas"
            }
          ],
          "product_exists": true,
          "fulfillable_quantity": 1,
          "total_discount": "0.00",
          "fulfillment_status": null,
          
        }
      }
    ],
    "transactions": [
      {
        "id": 179259969,
        "order_id": 450789469,
        "amount": "209.00",
        "kind": "refund",
        "gateway": "bogus",
        "status": "success",
        "message": null,
        "created_on": "2005-08-05T12:59:12Z",
        "test": false,
        "authorization": "authorization-key",
        "currency": "USD",
        "location_id": null,
        "user_id": null,
        "parent_id": null,
        "device_id": null,
        "receipt": {},
        "error_code": null,
        "source_name": "web"
      }
    ],
    "order_adjustments": [
    ]
  }
}

Bài viết trên có hữu ích cho bạn không?

Hữu ích Không hữu ích
Số lượt đánh giá hữu ích: