Skip to main content

[GET] Show Remote Payments List (All)

Description​

If you want to list all Payments, all their details and their status, you can use this enpoint and you will get what you need.

Requirements​

ℹ️ Before launching a payment, you need to have a Location created, as each payment will be related to a Location (location_id).

Authentication​

In all your requests you need to add, as a Header, your Authorization Token-ID:

"Name": "Authorization"
"Value": "Bearer YOUR-TOKEN-ID"

Environments​

Staging environment​

GET https://staging.sylq.io/remote_api/v1/remote_payments

Production/Live environment​

GET https://app.sylq.io/remote_api/v1/remote_payments

Examples of Request​

As a "Header" we need to specify the "Authorization" (Bearer value). If we want to make a simple Request, we can use this cURL example:

curl -i -H "Accept: application/json" -H "Authorization: Bearer YOUR-TOKEN-ID" -X GET "https://staging.sylq.io/remote_api/v1/remote_payments"

If we want to make more complex Requests, we can see below how to use the Parameters or the JSON Body to apply Filters.

Managing Pagination, Limits and Filters to the Requests​

Pagination and Limits (Parameters)​

Example of the Requests with Parameters:

  • Page (integer), the pagination of the results.
  • Limit (integer), the maximum number of results
curl -i -H "Accept: application/json" -H "Authorization: Bearer YOUR-TOKEN-ID" -X GET "https://staging.sylq.io/remote_api/v1/remote_payments?limit=1&page=1"

Filters (JSON Request body)​

If we wish, we can specify filters to our return of the request, so we have the option of attaching a JSON Body to the query, example:

{
"q": {
"payment_payment_method_eq": "string",
"payment_status_eq": "string",
"external_reference_eq": "string",
"today": true,
"yesterday": true,
"1_month_ago": true,
"1_year_ago": true,
"payment_amount_lt": 0,
"payment_amount_gt": 0
}
}
  • payment_payment_method_eq (string), we can filter by Payment types, e.g. "card", "crypto" or "bank".
  • payment_status_eq (string), we can filter by Status types, e.g. "Confirmed", "Pending", etc... ℹ️ If you want to see the Payments status code, please, read the section of "[GET] Retrieve Status".
  • external_reference_eq (string), we can filter by the External Reference.
  • today (boolean), we can specify that only today's Transactions are shown.
  • yesterday (boolean), we can specify that only yesterday's Transactions are shown.
  • 1_month_ago (boolean), we can specify that only Transactions from one month ago are shown.
  • 1_year_ago (boolean), we can specify that only Transactions from one year ago are shown.
  • payment_amount_lt (number, double), LT is the acronym for "Less Than" and here we can specify a return of values that are less than the indicated number
  • payment_amount_gt (number, double), GT is the acronym for "Greater Than" and here we can specify a return of values that are greater than the indicated number

However, it can also be reported as a Parameter, e.g. cURL:

curl -i -H "Accept: application/json" -H "Authorization: Bearer YOUR-TOKEN-ID" -X GET "https://staging.sylq.io/remote_api/v1/remote_payments?page=1&limit=10&q[payment_status_eq]=expired&q[payment_payment_method_eq]=card&q[amount_lt]=10&q[amount_gt]=30&q[yesterday]=true"

Examples of Returns​

Success response (200)​

{
"success": true,
"message": "Success",
"data": {
"total_payments": 10,
"total_of_pages": 2,
"current_page": 1,
"remote_payments": [
{
"id": 58,
"external_reference": "UVCFC6UZ8Q",
"device_id": 110,
"place_id": 722,
"created_at": "2024-03-04T21:37:53.834Z",
"payment": {
"id": 219,
"reference": "HFGAY7CKLE",
"description": "Hic doloremque et facere.",
"amount": 132.25,
"currency": "EUR",
"status": "pending_refund",
"type": "card",
"latitude": null,
"longitude": null,
"merchant_id": 28571242,
"holder_ticket": "Sit sit sunt. Moles.",
"merchant_ticket": "Quae et quia. Excep."
},
"refund_details": {
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"currency": "EUR",
"merchant_id": 28571242,
"payment_reference": "HFGAY7CKLE",
"created_at": "2024-03-04T21:37:53.728Z",
"total_refunds": 1,
"refunds": [
{
"id": 64,
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"amount": "14.01",
"currency": "EUR",
"type": "partial",
"refund_reference": "VHHVOWRRWC",
"payment_reference": "HFGAY7CKLE",
"notes": "Unde nobis magnam quia.",
"status": "new",
"created_at": "2024-03-04T21:37:53.737Z"
}
]
}
},
{
"id": 57,
"external_reference": "FU4O7LE5P8",
"device_id": 110,
"place_id": 722,
"created_at": "2024-03-04T21:37:53.825Z",
"payment": {
"id": 219,
"reference": "HFGAY7CKLE",
"description": "Hic doloremque et facere.",
"amount": 132.25,
"currency": "EUR",
"status": "pending_refund",
"type": "card",
"latitude": null,
"longitude": null,
"merchant_id": 28571242,
"holder_ticket": "Sit sit sunt. Moles.",
"merchant_ticket": "Quae et quia. Excep."
},
"refund_details": {
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"currency": "EUR",
"merchant_id": 28571242,
"payment_reference": "HFGAY7CKLE",
"created_at": "2024-03-04T21:37:53.728Z",
"total_refunds": 1,
"refunds": [
{
"id": 64,
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"amount": "14.01",
"currency": "EUR",
"type": "partial",
"refund_reference": "VHHVOWRRWC",
"payment_reference": "HFGAY7CKLE",
"notes": "Unde nobis magnam quia.",
"status": "new",
"created_at": "2024-03-04T21:37:53.737Z"
}
]
}
},
{
"id": 56,
"external_reference": "VSNRRTCPHE",
"device_id": 110,
"place_id": 722,
"created_at": "2024-03-04T21:37:53.809Z",
"payment": {
"id": 219,
"reference": "HFGAY7CKLE",
"description": "Hic doloremque et facere.",
"amount": 132.25,
"currency": "EUR",
"status": "pending_refund",
"type": "card",
"latitude": null,
"longitude": null,
"merchant_id": 28571242,
"holder_ticket": "Sit sit sunt. Moles.",
"merchant_ticket": "Quae et quia. Excep."
},
"refund_details": {
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"currency": "EUR",
"merchant_id": 28571242,
"payment_reference": "HFGAY7CKLE",
"created_at": "2024-03-04T21:37:53.728Z",
"total_refunds": 1,
"refunds": [
{
"id": 64,
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"amount": "14.01",
"currency": "EUR",
"type": "partial",
"refund_reference": "VHHVOWRRWC",
"payment_reference": "HFGAY7CKLE",
"notes": "Unde nobis magnam quia.",
"status": "new",
"created_at": "2024-03-04T21:37:53.737Z"
}
]
}
},
{
"id": 55,
"external_reference": "VVE5NQGJS7",
"device_id": 110,
"place_id": 722,
"created_at": "2024-03-04T21:37:53.805Z",
"payment": {
"id": 219,
"reference": "HFGAY7CKLE",
"description": "Hic doloremque et facere.",
"amount": 132.25,
"currency": "EUR",
"status": "pending_refund",
"type": "card",
"latitude": null,
"longitude": null,
"merchant_id": 28571242,
"holder_ticket": "Sit sit sunt. Moles.",
"merchant_ticket": "Quae et quia. Excep."
},
"refund_details": {
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"currency": "EUR",
"merchant_id": 28571242,
"payment_reference": "HFGAY7CKLE",
"created_at": "2024-03-04T21:37:53.728Z",
"total_refunds": 1,
"refunds": [
{
"id": 64,
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"amount": "14.01",
"currency": "EUR",
"type": "partial",
"refund_reference": "VHHVOWRRWC",
"payment_reference": "HFGAY7CKLE",
"notes": "Unde nobis magnam quia.",
"status": "new",
"created_at": "2024-03-04T21:37:53.737Z"
}
]
}
},
{
"id": 54,
"external_reference": "O06R7QMQY0",
"device_id": 110,
"place_id": 722,
"created_at": "2024-03-04T21:37:53.801Z",
"payment": {
"id": 219,
"reference": "HFGAY7CKLE",
"description": "Hic doloremque et facere.",
"amount": 132.25,
"currency": "EUR",
"status": "pending_refund",
"type": "card",
"latitude": null,
"longitude": null,
"merchant_id": 28571242,
"holder_ticket": "Sit sit sunt. Moles.",
"merchant_ticket": "Quae et quia. Excep."
},
"refund_details": {
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"currency": "EUR",
"merchant_id": 28571242,
"payment_reference": "HFGAY7CKLE",
"created_at": "2024-03-04T21:37:53.728Z",
"total_refunds": 1,
"refunds": [
{
"id": 64,
"payment_refund_id": 67,
"refund_method": "card",
"amount_refunded": "0.0",
"amount_refundable": "118.24",
"amount": "14.01",
"currency": "EUR",
"type": "partial",
"refund_reference": "VHHVOWRRWC",
"payment_reference": "HFGAY7CKLE",
"notes": "Unde nobis magnam quia.",
"status": "new",
"created_at": "2024-03-04T21:37:53.737Z"
}
]
}
}
]
}
}

ℹ️ If you want to see the Payments status code, please, read the section of "[GET] Retrieve Status"

Error responses​

Unauthorized (401)​

This error appears it is because the credential is incorrect or does not exist.

{
"message": "Unauthorized"
}