Thanh toán
Danh sách hóa đơn
API này trả về danh sách hóa đơn (cả Đã thanh toán và Chưa thanh toán) cho nhóm nhất định theo thứ tự giảm dần của ngày tạo. Hóa đơn cũng chứa danh sách chi tiết đơn hàng (mục trong API) cho hóa đơn đó.
Điểm cuối
/api/method/press.api.billing.get_summary
Request
import requests
headers = {
"Authorization": "Token <api-key>:<api-secret>",
"X-Press-Team": "<team>"
}
requests.get("https://frappecloud.com/api/method/press.api.billing.get_summary", headers=headers).json()
All requests require Authorization and X-Press-Team headers.
Mẫu dữ liệu trả về:
{
"message": [
{
"name": "INV-2022-00106",
"status": "Paid",
"period_end": "2022-07-31",
"payment_mode": "Card",
"type": "Subscription",
"currency": "INR",
"amount_paid": 750.0,
"items": [
{
"amount": 750.0,
"name": "whatsapp.frappe.cloud",
"type": "Site",
"parent": "INV-2022-00106",
"quantity": 30.0,
"rate": 25.0,
"plan": "USD 25"
}
]
}
]
}