Edenred Direct Payment Services icon

Edenred Direct Payment Services

(0 reviews)

Get Transactions


Context

This API enables you to retrieve a set of transactions.

All transactions type can be retrieved : transactions processed with success or in error on Edenred side

How to reach this API ?

This API is only accessible via our new URL :

How to use this API ?

In this section, we will explain how to use the new APIs.

Get Transactions

This API exposes a set of search criteria used to retrieve a set of transactions.

Search TypeCriteriaDescription
By Range datefrom
to
Get All transactions for the specified range of dates.
Rule: A range date is mandatory to perform a request
Rule: you can search for transactions up to 3 months in the past.

- Criteria:
from=<start_date>&
to=<end_date>

- Example:
/transactions?from=2020-01-12T10:10:12Z&to=2020-01-16T10:10:12Z
By Statusstatus
from
to
Get All transactions for the given transaction status in a specified range of dates.
Rule: eligible status : "authorized", "captured", "refunded" or "refused"

- Criteria:
status=<status>&
from=<start_date>&
to=<end_date>

- Example:
/transactions?status=captured&from=2021-01-12T10:10:12Z&to=2021-01-16T10:10:12Z
By Usernameusername
from
to
Get All transactions for the given username in a specified range of dates.

- Criteria:
username=<username>&
from=<start_date>&
to=<end_date>

-Example:
/transactions?username=edg@test.net&from=2021-01-12T10:10:12Z&to=2021-01-16T10:10:12Z
By Amountamount
from
to
Get All transactions for the given amount in a specified range of dates.

- Criteria:
amount=<amount>&
from=<start_date>&
to=<end_date>

-Example:
/transactions?amount=500&from=2021-01-12T10:10:12Z&to=2021-01-16T10:10:12Z
By Order Referenceorder_ref
from
to
Get All transactions for the given order_ref in a specified range of dates.

- Criteria:
order_ref=<order_ref>&
from=<start_date>&
to=<end_date>

-Example:
/transactions?order_ref=Order-001&from=2021-01-12T10:10:12Z&to=2021-01-16T10:10:12Z
By Merchant Identifiermerchant_id
from
to
Get All transactions for the given merchant_id in a specified range of dates.

- Criteria:
merchant_id=<merchant_id>&
from=<start_date>&
to=<end_date>

-Example:
/transactions?merchant_id=12034&from=2021-01-12T10:10:12Z&to=2021-01-16T10:10:12Z
By Status and Merchant Identifiermerchant_id
from
to
Get All transactions for the given order_ref in a specified range of dates.

- Criteria:
merchant_id=<merchant_id>&
status=<status>&
from=<start_date>&
to=<end_date>

-Example:
/transactions?status=captured&merchant_id=12034&from=2021-01-12T10:10:12Z&to=2021-01-16T10:10:12Z

HTTP Request Headers

  • Security:

The security of this API is managed by the HTTP request header X-Client-Id and X-Client-Secret

Please use the Payment-Client-Id and Payment-Client-Secret you use to call other APIs (Get Balance...)

Exemple:

  X-Client-Id: c3786ed428174b5cb43faca0b4bde857
  X-Client-Secret: b3631663092443f7A547332871468B09
  • Pagination:

The pagination is managed by the http request header Range

Due to performance concern, we recommend to search 20 items per page

The HTTP request header "Range" indicates the part of a document that the server should return. Several parts can be requested with one Range header at once, and the server may send back these ranges in a multipart document.

Exemple:

  Range: item=0-19
RangeDescription
item=0-19will return 20 items from 0 to 19
item=20-39will return 20 items from 20 to 39
item=40-59will return 20 items from 40 to 59
......

HTTP Response Headers

  • Accept-Range

The Accept-Ranges response-header field allows the server to indicate its acceptance of range requests for a resource.

Accept-Ranges: <range-unit>

Accept-Ranges: none

<range-unit> : Defines the range unit the server supports. At Edenred we use the unit item when it comes to collection resources.

item 50
  • Content-Range

The Content-Range response HTTP header indicates where in a full body message a partial message belongs.

Content-Range: -/<unit> : The unit in which ranges are specified. This is usually bytes.

<range-start> : An integer in the given unit indicating the beginning of the request range.

<range-end> : An integer in the given unit indicating the end of the requested range.

<size> : The total size of the document (or '*' if unknown).

item 0-47/50

Examples of Response

{
  "meta": {
    "status": "succeeded",
    "messages": []
  },
  "data": [
    {
      "ref": "MTYxMjQ2OTE4MTEwMzUxNTM4MDAwM-427032",
      "username": "myedenred@gmail.com",
      "date": "2021-01-22T13:55:12+01:00",
      "total_amount": 1900,
      "partner_name": "MyOrder",
      "product_class": "ETR",
      "session_id": "b2e77d47a0479900504cb3ab4a1f626d174d2d",
      "transaction_details": [
        {
          "type": "edenred",
          "id": "MTYxMjQ2OTE4MTEwMzUxNTM4MDAwM-427032",
          "merchant": {
            "id": "123456",
            "details": {
              "name": "BOUCHERIE LES 4 CHEMINS",
              "address": {
                "address_line_1": "AVENUE DES FARIGOULES",
                "zip_code": "04130",
                "city_name": "VOLX"
              }
            }
          },
          "order_ref": "Order-123",
          "extra_field": "MyOrder|123",
          "amount": 1900,
          "status": {
            "code": "captured"
          }
        }
      ]
    },
    {
      "ref": "MTYxMjS5OTE4MTEwLzKxNTM4MDAwM-652019",
      "username": "edpstest@edenred.com",
      "date": "2021-01-21T12:55:12+01:00",
      "total_amount": 1250,
      "partner_name": "MyOrder",
      "product_class": "ETR",
      "session_id": "1f626d17aab4796d504b13ab4a1f626d173ab4",
      "transaction_details": [
        {
          "type": "edenred",
          "id": "MTYxMjS5OTE4MTEwLzKxNTM4MDAwM-652019",
          "merchant": {
            "id": "123456",
            "details": {
              "name": "BOUCHERIE LES 4 CHEMINS",
              "address": {
                "address_line_1": "AVENUE DES FARIGOULES",
                "zip_code": "04130",
                "city_name": "VOLX"
              }
            }
          },
          "order_ref": "Order-234",
          "extra_field": "MyOrder|234",
          "amount": 1250,
          "status": {
            "code": "refunded"
          }
        }
      ]
    },
    {
      "ref": "d11a4c64-8004-437a-8b40-9d1574165d86",
      "username": "edpstest@edenred.com",
      "date": "2021-01-18T08:15:12+01:00",
      "total_amount": 1800,
      "partner_name": "MyOrder",
      "product_class": "ETR",
      "session_id": "b4a1f6267a0479900504cb3ab4a1f626d14050",
      "transaction_details": [
        {
          "type": "edenred",
          "id": "d11a4c64-8004-437a-8b40-9d1574165d86",
          "merchant": {
            "id": "4352345",
            "details": {
              "name": "COLRUYT",
              "address": {
                "address_line_1": "4 PLACE DE LA GARE",
                "zip_code": "04130",
                "city_name": "VOLX"
              }
            }
          },
          "order_ref": "Order-5425",
          "extra_field": "MyOrder|52562",
          "amount": 1800,
          "status": {
            "code": "refused",
            "details": "INSUFFICIENT_FUNDS|Insufficient funds"
          }
        }
      ]
    }
  ]
}


Reviews