Get information about payments for one bill.
Request parameters
Parameters |
Required |
Type |
Format |
Possible value |
Example |
Description |
id |
yes |
string |
|
|
LXZv3R7Q8B |
Unique bill ID |
Response example
Parameters |
Type |
Format |
Possible value |
Example |
Description |
data |
array |
Payment |
|
Please, check the Payment description |
Information about payments |
success |
bool |
|
true/false |
true |
Result |
Payment
Name of parameter |
Type |
Format |
Possible value |
Example |
Description |
id |
string |
|
|
jZqmaPvl9W |
Unique payment ID |
status |
enum |
|
NEW PROCESS UNDERPAID SUCCESS OVERPAID FAIL |
NEW |
Status of payment/td>
|
amount |
decimal |
decimal(10,2) |
|
24600.05 |
Total payment amount |
amount_received |
decimal |
decimal(10,2) |
|
24500.05 |
Received amount |
from_card |
string |
card |
|
671254******7272 |
Payer's card |
|
|
|
|
|
|
currency_in |
enum |
|
RUB USD EUR KZT |
RUB |
Payment currency |
|
|
|
|
|
|
created_at |
datetime |
Y-m-d H:i:s |
|
2020-10-19 17:00:00 |
Creation date and time |
Request example
curl -X GET 'https://cardlink.link/api/v1/bill/payments?id=LXZv3R7Q8B' \
-H 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'
Response
{
"data": [
{
"id": "PQX2XD25a0",
"bill_id": "5QWlqB2kKJ",
"status": "SUCCESS",
"amount": 35400,
"amount_received": 33875.6,
"from_card": "676454******7272",
"currency_in": "RUB",
"created_at": "2020-10-19 17:00:00"
},
{
"id": "zeAmwP2d5Q",
"bill_id": "5QWlqB3kKJ",
"status": "NEW",
"amount": 3200,
"amount_received": 3062.2,
"from_card": "676454******7272",
"currency_in": "RUB",
"created_at": "2020-10-18 17:00:00"
},
{
"id": "NDa7lNmdzx",
"bill_id": "5QWlqB4kKJ",
"status": "FAIL",
"amount": 26100,
"amount_received": 24976.08,
"from_card": "553691******4442",
"currency_in": "RUB",
"created_at": "2020-10-01 17:00:00"
}
],
"success": true
}
Possible errors
Response codes |
Message |
Description |
400 |
api:error.too_many_payments |
You are trying to get too many payments in one request. |
401 |
Unauthenticated |
Invalid API Token |
403 |
api:error.merchant_not_found |
Merchant is not found |
403 |
api:error.merchant_banned |
Merchant is blocked |
403 |
api:error.bill_not_found |
Bill is not found |