Zahlungshistorie

Gibt eine Liste von Rechnungen zurück

post
https://api.cryptomus.com/v1/payment/list
KOPIEREN

Anfrage

Abfrageparameter

NameParametertypStandardwertDefinition
date_fromstringformat: YYYY-MM-DD H:mm:ssnullFilterung durch Erschaffungsdatum von
date_tostringformat: YYYY-MM-DD H:mm:ssnullFilterung durch Erschaffungsdatum zu

Parametertyp

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

Definition

Filterung durch Erschaffungsdatum von

Parametertyp

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

Definition

Filterung durch Erschaffungsdatum zu

Beispiel anfordern


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' \
KOPIEREN

Rechnungen durch Erstellen von Datum vom 4. bis 16. Mai filtern.


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"
}'
KOPIEREN

Antwort

Antwortparameter

NameDefinition
itemsAuswahl an Rechnungen. Struktur des Elements
paginate

Definition

Auswahl an Rechnungen. Struktur des Elements

Definition

Die Struktur vonpaginieren

NameParametertypDefinition
countintegerAnzahl der Elemente auf der aktuellen Seite
hasPagesbooleanOb es genügend Elemente gibt, um sich in mehrere Seiten aufzuteilen (True / False)
nextCursorstring / nullCursor zur nächsten Seite
previousCursorstring / nullCursor zur vorherigen Seite
perPageintegerMaximale Anzahl von Elementen pro Seite

Parametertyp

integer

Definition

Anzahl der Elemente auf der aktuellen Seite

Parametertyp

boolean

Definition

Ob es genügend Elemente gibt, um sich in mehrere Seiten aufzuteilen (True / False)

Parametertyp

string / null

Definition

Cursor zur nächsten Seite

Parametertyp

string / null

Definition

Cursor zur vorherigen Seite

Parametertyp

integer

Definition

Maximale Anzahl von Elementen pro Seite
Um die nächsten/vorherigen Seiteneinträge zu erhalten, geben Sie den nächsten/vorherigen Cursor -Hash in den Abfrageparametern an (?cursor=nextCursorHash)

Beispiel:


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
KOPIEREN

Antwortbeispiel


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}
KOPIEREN

Mögliche Fehler

Validierungsfehler

Code : 422

Beispielantworten:

Wenn der Parameter date_from oder date_to im falschen Format übergeben wird:


1{
2	"state": 1,
3	"errors": {
4		"date_from": ["validation.regex"]
5	}
6}
KOPIEREN