Skip to content

Searching transactions

[GET] https://gateway.paag.dev/api/transactions

You will use this endpoint to list all the transactions on your processor. Note that for every new event that is sent under the same transaction, the transaction’s updated_at field is updated.

Filtering is enabled to this endpoint through query parameter search. So when searching for a field, submit it through the endpoint’s query parameters, for example:

Example

https://gateway.paag.dev/api/transactions?search[first_name]=John&search[last_name]=Doe

Filter types

You can use filters on the fields like described below:

  • starts with matches records in a SQL LIKE fashion, e.g.: a string Transac will match both Transaction and TransactionEvent;
  • exact comparison matches records through exact comparison, (case sensitive) e.g.: a string Transaction will NOT match transaction;
  • date matches records through SQL date, and these fields should be provided on Y-m-d H:i:s format, e.g.: 2022-02-02 17:59:00

Also, this endpoint provides pagination to navigate through record sets. Pagination information can be found in the meta response field. The pages always returns 50 records at a time. While using reporting capabilities, make sure to monitor rate limits through X-RateLimit-Limit and X-RateLimit-Remaining response headers.

Query params

Field name Data type Filter type
search[merchant_transaction_id] string starts with
search[card_number] string starts with. Should only search by the first six digits
search[first_name] string starts with
search[last_name] string starts with
search[email] string starts with
search[mobile_phone] string starts with
search[user_id] string exact comparison
search[city] string starts with
search[state] string exact comparison
search[zip] string exact comparison
search[shipping_city] string starts with
search[shipping_state] string exact comparison
search[shipping_zip] string exact comparison
search[created_at_gte] date date
search[created_at_lte] date date
search[updated_at_gte] date date
search[updated_at_lte] date date

Examples

Get all transactions from January 2024

curl --request GET \
     --url 'https://gateway.paag.dev/api/transactions?search[created_at_gte]=2024-01-01&search[created_at_lte]=2024-01-31' \
     --header 'Authorization: Bearer MY_API_TOKEN' \
     --header 'accept: application/json'
    import requests

    url = "https://gateway.paag.dev/api/transactions?search[created_at_gte]=2024-01-01&search[created_at_lte]=2024-01-31"

    headers = {
        "accept": "application/json",
        "Authorization": "Bearer MY_API_TOKEN"
    }

    response = requests.get(url, headers=headers)

    print(response.text)

Responses

201 - Success
{
    "transactions": [
        {
            "id": "123-456-789",
            "merchant_id": "123-456-789",
            "user_id": "123-456-789",
            "processor_id": "123-456-789",
            "merchant_transaction_id": "0000001",
            "card_number": "411111******1111",
            "card_brand": "visa",
            "card_expiry_month": "01",
            "card_expiry_year": "2021",
            "first_name": "Foo",
            "last_name": "Bar",
            "street_address_1": "Addr 1",
            "street_address_2": "Addr 2",
            "city": "New York",
            "state": "PA",
            "country": "US",
            "zip": "12345",
            "email": "foo.bar@mail.com",
            "mobile_phone": "+1231231234",
            "updated_at": "2022-02-02T16:33:40+00:00",
            "created_at": "2022-02-02T16:33:39+00:00",
            "events": [
                {
                    "id": "123-456-789",
                    "success": true,
                    "event_type": "sale",
                    "amount": "1.00",
                    "updated_at": "2022-02-02T16:33:40+00:00",
                    "created_at": "2022-02-02T16:33:39+00:00"
                }
            ]
        },
        {
            "id": "123-456-789",
            "merchant_id": "123-456-789",
            "user_id": "123-456-789",
            "processor_id": "123-456-789",
            "merchant_transaction_id": "0000001",
            "card_number": "411111******1111",
            "card_brand": "visa",
            "card_expiry_month": "01",
            "card_expiry_year": "2021",
            "first_name": "Foo",
            "last_name": "Bar",
            "street_address_1": "Addr 1",
            "street_address_2": "Addr 2",
            "city": "New York",
            "state": "PA",
            "country": "US",
            "zip": "12345",
            "email": "foo.bar@mail.com",
            "mobile_phone": "+1231231234",
            "updated_at": "2018-02-16T16:33:32+00:00",
            "created_at": "2018-02-16T16:33:29+00:00",
            "events": [
                {
                    "id": "123-456-789",
                    "success": true,
                    "event_type": "sale",
                    "amount": "1.00",
                    "updated_at": "2022-02-02T16:33:40+00:00",
                    "created_at": "2022-02-02T16:33:39+00:00"
                }
            ]
        }
    ],
    "meta": {
        "last_page": 1,
        "current_page": 1,
        "total": 2
    }
}
401 - Not authenticated
{
  "error": {
    "message": {
      "base": [
        "Not authenticated"
      ]
    },
    "status": 401
  },
  "debug": []
}