1. v1
Tourwell Open APIs
  • Tổng quan
  • Hướng dẫn xác thực
  • API Zalo Mini App (Beta)
  • API Changelog
  • Error Response
  • Khách hàng
    • v1
      • Get by id
      • Get all customer
      • Create customer
      • Update customer
      • Get order history
      • Get destinations
      • Get guests
      • Get by id care history
      • Create company
      • Get all care history
      • Get all company
  • Đơn hàng
    • v1
      • Get by id
      • Get all order
      • Get Passengers Order
      • Create order tour
      • Create order product
      • Create order hotel
      • Create order flight
      • Confirm payment order
      • Cancel order
      • Import Order Flight
      • Create cost order
      • Update cost order
      • Delete cost order
      • Transfer operator
      • Create order multiple services
      • Add services to order.
      • Change order status
      • Add Passengers Order
      • Update Passenger Order
      • Delete Passenger Order
  • Điều hành
    • v1
      • Overview
      • Get row cost
      • Create row cost
      • Update row cost
      • Delete row cost
  • Sản phẩm
    • v1
      • Create product
      • Get by id
      • Calendar pricing
      • Get all product
      • Get schedule by id
      • Update product
  • Chiết tinh giá
    • v1
  • Nhà cung cấp
    • v1
      • Get all suppliers
      • Get suppliers products
      • Get all tour guides
      • Create Supplier & Hotel
      • Create Prices Suppliers products
      • Append Prices Hotel
  • Lịch khởi hành
    • v1
      • Get all tour
      • Create tour
      • Get tour detail
      • Get tour orders
  • Lead (Cơ hội)
    • Overview
    • Update History
    • v1
      • Get all lead
      • Get by id
      • Create lead
      • Update lead
  • Báo giá
    • v1
      • Get all
      • Update schedules
      • Update policy
  • Khách sạn
    • v1
      • Get all hotel
      • Get by id
  • Kế toán
    • Phiếu thu
      • v1
        • Get all receipt
          GET
        • Create receipt
          POST
        • Cancel receipt
          POST
        • Update receipt
          PUT
        • Confirm Receipt Success
          POST
    • Phiếu chi
      • v1
        • Get all payment
        • Confirm Payment
    • Hóa đơn bán ra
      • Update invoice
      • Issue Invoice
      • Get by id
      • Cancel invoice
    • Hóa đơn mua vào
      • Import
    • Thu hộ/Chi hộ
  • Phê duyệt
    • v1
      • Overview
      • Summary
      • Approvals
  • Cấu hình
    • Zalo ZNS
      • Danh sách Tag
      • Get token
    • Địa điểm
      • Search
    • Nhân sự nội bộ
      • Search
    • Webhook
      • Hướng dẫn cài đặt
    • Trạng thái khách hàng
      • Get All
    • Hạng thành viên
      • Get All
    • Loại dịch vụ
      • Get All
    • Mã sân bay
      • Get All Airport
    • Phương thức thanh toán
      • Get All
    • Nguồn bán hàng
      • Get All
    • Phễu chuyển đổi lead
      • Trạng thái lead
      • Trạng thái báo giá
    • Chi nhánh
      • Get all branch offices
    • Lý do hủy
      • Get all cancel reasons
  • Hướng dẫn tích hợp
    • Hướng dẫn tích hợp thanh toán trực tuyến qua Website và Tourwell
    • Hướng dẫn tích hợp thanh toán trực tuyến qua Website, Cổng thanh toán và Tourwell
    • Kết nối hệ thống báo giá, chốt đơn nội bộ với Tourwell
    • Hướng dẫn đẩy lead và đơn hàng về Tourwell
  • MCP
    • Hướng dẫn kết nối
  • Schemas
    • ErrorResponse
  1. v1

Cancel receipt

POST
/billings/receipts/{id}/cancel
Hủy phiếu thu. Kết quả giống thao tác hủy phiếu trên màn quản trị.
Phiếu trước khi hủyKết quả
Chờ duyệtPhiếu chuyển sang Đã hủy. Số tiền đã thu của đơn không đổi (phiếu chưa duyệt chưa được tính)
Đã duyệtPhiếu chuyển sang Đã hủy, số tiền đã thu của đơn bị trừ lại tương ứng
Đã hủyKhông thay đổi gì, trả 200 với message Receipt already canceled
Gọi lặp an toàn: gửi lại cùng request không gây thay đổi thêm. Có thể thử lại khi timeout.
Phiếu đã hủy không duyệt lại được (Confirm Receipt Success trả 409). Cần thu lại thì tạo phiếu mới.
Lý do hủy (reason) được ghi vào lịch sử phiếu, kèm nguồn open_api.
Phiếu đã hủy không còn gắn với đơn, nên không hiện khi lọc Get all receipt theo payment_code.
Hệ thống tích hợp cần lưu id phiếu từ lúc tạo.
Chỉ áp dụng cho phiếu thu. ID là phiếu chi → 400.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Header Params

Body Params application/json

Examples
{
    "reason": "Khách hủy đơn, hoàn tiền qua cổng thanh toán"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://demo.tourwell.net/billings/receipts/5551/cancel' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "reason": "Khách hủy đơn, hoàn tiền qua cổng thanh toán"
}'

Responses

🟢200Thành công
application/json
Bodyapplication/json

Examples
{
    "success": true,
    "message": "Receipt canceled successfully",
    "data": {
        "id": 5551,
        "code": "PT1150",
        "is_canceled": true,
        "was_approved": true,
        "order_ids": [
            23284
        ]
    }
}
🟠400Sai loại phiếu
🟠401Chưa xác thực
🟠404Không tìm thấy
🟠422Sai dữ liệu
Modified at 2026-11-17 02:18:38
Previous
Create receipt
Next
Update receipt
Built with