سجل الدفع

إرجاع قائمة الفواتير

post
https://api.cryptomus.com/v1/payment/list
ينسخ

طلب

معلمات الاستعلام

اسمنوع المعلمةالقيمة الافتراضيةتعريف
date_fromstringformat: YYYY-MM-DD H:mm:ssnullتصفية حسب تاريخ الخلق ، من
date_tostringformat: YYYY-MM-DD H:mm:ssnullتصفية حسب تاريخ الخلق ، إلى

نوع المعلمة

stringformat: YYYY-MM-DD H:mm:ss

تعريف

تصفية حسب تاريخ الخلق ، من

نوع المعلمة

stringformat: YYYY-MM-DD H:mm:ss

تعريف

تصفية حسب تاريخ الخلق ، إلى

طلب مثال


curl https://api.cryptomus.com/v1/payment/list \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: f80fa426a89eb62bd53997326865d850' \
-H 'Content-Type: application/json' \
ينسخ

لتصفية الفواتير حسب تاريخ الإنشاء من 4 مايو إلى 16 مايو.


curl https://api.cryptomus.com/v1/payment/list \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: f80fa426a89eb62bd53997326865d850' \
-H 'Content-Type: application/json' \
-d '{
	"date_from": "2023-05-04 00:00:00"
	"date_to": "2023-05-16 23:59:59"
}'
ينسخ

إجابة

معلمات الاستجابة

اسمتعريف
itemsمجموعة من الفواتير. هيكل البند
paginate

تعريف

مجموعة من الفواتير. هيكل البند

تعريف

هيكلقمة

اسمنوع المعلمةتعريف
countintegerعدد العناصر في الصفحة الحالية
hasPagesbooleanما إذا كانت هناك عناصر كافية للانقسام إلى صفحات متعددة (صواب / خطأ)
nextCursorstring / nullالمؤشر إلى الصفحة التالية
previousCursorstring / nullالمؤشر إلى الصفحة السابقة
perPageintegerالحد الأقصى لعدد العناصر لكل صفحة

نوع المعلمة

integer

تعريف

عدد العناصر في الصفحة الحالية

نوع المعلمة

boolean

تعريف

ما إذا كانت هناك عناصر كافية للانقسام إلى صفحات متعددة (صواب / خطأ)

نوع المعلمة

string / null

تعريف

المؤشر إلى الصفحة التالية

نوع المعلمة

string / null

تعريف

المؤشر إلى الصفحة السابقة

نوع المعلمة

integer

تعريف

الحد الأقصى لعدد العناصر لكل صفحة
للحصول على إدخالات الصفحة التالية/السابقة ، حدد تجزئة المؤشر التالي/السابق في معلمات الاستعلام (?cursor=nextCursorHash)

مثال:


1curl https://api.cryptomus.com/v1/payment/list?cursor=eyJpZCI6MjEyLCJ fcG9pbnRzVzVG9OZhXh0SXRlbXMiOnRydWV9 \
2-X POST \
3-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
4-H 'sign: f80fa426a89eb62bd53997326865d850' \
5-H 'Content-Type: application/json' \
6
ينسخ

مثال على الاستجابة


1{
2	"state": 0,
3	"result": {
4		"items": [{
5			"uuid": "ac1af391-8e98-4335-b9d7-7b6f6b40f268",
6			"order_id": "20fe59c4601dd174985e497e3f6bbcd2",
7			"amount": "20.00",
8			"payment_amount": "0.00000000",
9			"payer_amount": "0.00064860",
10			"discount_percent": 0,
11			"discount": "0.00000000",
12			"payer_currency": "BTC",
13			"currency": "USD",
14			"merchant_amount": null,
15			"comments": null,
16			"network": "btc",
17			"address": "bc1qxm6ehuy6mz2l2h3ag88frcjvl2xxlr9hvnq835",
18			"from": null,
19			"txid": null,
20			"payment_status": "cancel",
21			"url": "https://pay.cryptomus.com/pay/ac1af391-8e98-4335-b9d7-7b6f6b40f268",
22			"expired_at": 1689172103,
23			"status": "cancel",
24			"is_final": true,
25			"additional_data": null,
26			"created_at": "2023-07-12T16:28:24+03:00",
27			"updated_at": "2023-07-12T17:30:16+03:00"
28		}, {
29			"uuid": "1bb48358-2905-4e98-b681-5f1948e818d1",
30			"order_id": "a3329f462eb036dad12b5409147809a3",
31			"amount": "15.00",
32			"payment_amount": "0.00",
33			"payer_amount": "14.25",
34			"discount_percent": 5,
35			"discount": "0.75",
36			"payer_currency": "USDT",
37			"currency": "USDT",
38			"merchant_amount": "15.43500000",
39			"comments": null,
40			"network": "tron",
41			"address": "TSChodGNEJ6D31d9uueFxJAVH9NxiJjTwC",
42			"from": null,
43			"txid": null,
44			"payment_status": "cancel",
45			"url": "https://pay.cryptomus.com/pay/1bb48358-2905-4e98-b681-5f1948e818d1",
46			"expired_at": 1689099958,
47			"status": "cancel",
48			"is_final": true,
49			"additional_data": null,
50			"created_at": "2023-07-11T20:25:58+03:00",
51			"updated_at": "2023-07-11T21:26:18+03:00"
52		}, {
53			"uuid": "70b8db5c-b952-406d-af26-4e1c34c27f15",
54			"order_id": "65bbe87b4098c17a31cff3e71e515243",
55			"amount": "15.00",
56			"payment_amount": "0.00",
57			"payer_amount": "15.75",
58			"discount_percent": -5,
59			"discount": "-0.75",
60			"payer_currency": "USDT",
61			"currency": "USDT",
62			"merchant_amount": "15.43500000",
63			"comments": null,
64			"network": "tron",
65			"address": "TXhfYSWt2oKRrHAJVJeYRuit6ZzKuoEKXj",
66			"from": null,
67			"txid": null,
68			"payment_status": "cancel",
69			"url": "https://pay.cryptomus.com/pay/70b8db5c-b952-406d-af26-4e1c34c27f15",
70			"expired_at": 1689099831,
71			"status": "cancel",
72			"is_final": true,
73			"additional_data": null,
74			"created_at": "2023-07-11T20:23:52+03:00",
75			"updated_at": "2023-07-11T21:24:17+03:00"
76		},
77		...
78],
79		"paginate": {
80			"count": 15,
81			"hasPages": true,
82			"nextCursor": "eyJpZCI6MjkxNTU0MywiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ",
83			"previousCursor": null,
84			"perPage": 15
85		}
86	}
87}
ينسخ

الأخطاء المحتملة

أخطاء التحقق من الصحة

شفرة : 422

الإجابات مثال:

إذا تم تمرير المعلمة date_from أو date_to بالتنسيق الخاطئ:


1{
2	"state": 1,
3	"errors": {
4		"date_from": ["validation.regex"]
5	}
6}
ينسخ