Tourwell Open APIs
  1. v1
Tourwell Open APIs
  • Tổng quan
  • Hướng dẫn xác thực
  • API Beta 1.0
  • API Zalo Mini App (Beta)
  • Khách hàng
    • v1
      • Get by id
      • Get all customer
      • Create customer
      • Update customer
      • Get order history
  • Đơn hàng
    • v1
      • Get by id
      • Get all order
      • Create order tour
      • Create order product
      • Create order hotel
      • Confirm payment order
  • Sản phẩm
    • v1
      • Create product
      • Get by id
      • Calendar pricing
  • Lịch khởi hành
  • Lead (Cơ hội)
    • v1
      • Get all lead
      • Get by id
      • Create lead
      • Update lead
  • 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
    • Phiếu chi
      • v1
        • Get all payment
        • Confirm Payment
    • Hóa đơn
      • Update invoice
      • Issue Invoice
      • Get by id
      • Cancel invoice
  • 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
    • Loại dịch vụ
  • 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
  1. v1

Create receipt

POST
/api/v1/billings/receipts
API này cho phép người dùng tạo một phiếu thu mới bằng cách gửi thông tin phiếu thu qua yêu cầu POST

Request

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

Example
{
  "payment_method_id": 9,
  "total_amount": 2000000,
  "description": "Thu đơn hàng",
  "note": "KH chuyển khoản",
  "allocations": [
    {
      "ref_type": "order",
      "ref_code": "UP2202",
      "amount": 2000000
    }
  ],
  "qr_options": {
    "template": "compact2"
  }
}

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 --location --request POST 'https://demo.tourwell.net/api/v1/billings/receipts' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "payment_method_id": 9,
  "total_amount": 2000000,
  "description": "Thu đơn hàng",
  "note": "KH chuyển khoản",
  "allocations": [
    {
      "ref_type": "order",
      "ref_code": "UP2202",
      "amount": 2000000
    }
  ],
  "qr_options": {
    "template": "compact2"
  }
}'

Responses

🟢201Created
application/json
Body

Example
{
    "success": true,
    "message": "The Receipt Voucher created successfully",
    "data": {
        "code": "PT856",
        "qrcode_base64": null
    }
}
Modified at 2025-09-15 10:07:46
Previous
Get all receipt
Next
Get all payment
Built with