Fetch All Transactions
This API is to fetch all transactions of a user
GRAPHQL
Headers
| Fields | Type | Description | Example | Data Management |
|---|---|---|---|---|
| URL | string | {base_url}/users | ||
| GRAPHQL | string | QUERY | ||
| content-type | string | JSON | application/json | |
| x-access-token | string | session token with validity | token | user token |
Request
{
list_all_transactions(page_size: 3, page_number: 1, status: "") {
message
data {
_id
txn_id
txn_signature
type
amount
status
chain_network
currency
created_at
from_user_wid
to_user_wid
from_uid {
_id
name
email
}
to_uid {
_id
name
email
}
}
hasMore
}
}
Request Parameters
| Fields | Type | Description | Required |
|---|---|---|---|
| page_size | integer | total number of data to be displayed | ✘ |
| page_number | integer | page number to filter data | ✘ |
| status | string | to filter data based on Transaction status | ✘ |
Success
{
"data": {
"list_all_transactions": {
"message": "data listed",
"data": [
{
"_id": "63a5a59713f58d8ea3a9583d",
"txn_id": "txn_EwuZBkEwPhQsQsFtEwMl",
"txn_signature": "0x0750d981164ede92dd1854c03ff841e92254d6556dab9d68d04517bbb5e716ed",
"type": "transferred",
"amount": 0.001,
"status": "success",
"chain_network": "polygon_matic",
"currency": "matic",
"created_at": 1671800215,
"from_user_wid": "0xb26ADf2C03dA6Ab59029ab8F2eC365479d48a15d",
"to_user_wid": "0x8021C646fC19Af88a8C6b8304FE33af29f521CCd",
"from_uid": {
"_id": "6361f2c3896b1861246f81cc",
"name": "Sachin T S",
"email": "sachinsuresh704@gmail.com"
},
"to_uid": {
"_id": "638de5cb92d3e06365e3e97a",
"name": "sachin",
"email": "sachin@paysack.com"
}
},
{
"_id": "63a5987a6892e35e5471750e",
"txn_id": "txn_EwuZBkEwBkCxuZPhMlPh",
"txn_signature": "0x43d379dd1aaa97deeca306ca75e4a6a1de0f95de76176cdac4e145df258949e6",
"type": "transferred",
"amount": 0.001,
"status": "success",
"chain_network": "polygon_matic",
"currency": "matic",
"created_at": 1671796858,
"from_user_wid": "0xb26ADf2C03dA6Ab59029ab8F2eC365479d48a15d",
"to_user_wid": "0xA3131A125F6f2a3914560C93328AA7878C990A17",
"from_uid": {
"_id": "6361f2c3896b1861246f81cc",
"name": "Sachin T S",
"email": "sachinsuresh704@gmail.com"
},
"to_uid": null
},
{
"_id": "63a598636892e37591717505",
"txn_id": "txn_EwuZBkEwBkCxuZPhvgMl",
"txn_signature": null,
"type": "transferred",
"amount": 0.001,
"status": "failed",
"chain_network": "polygon_matic",
"currency": "matic",
"created_at": 1671796835,
"from_user_wid": "0xb26ADf2C03dA6Ab59029ab8F2eC365479d48a15d",
"to_user_wid": "0xA3131A125F6f2a3914560C93328AA7878C990A17",
"from_uid": {
"_id": "6361f2c3896b1861246f81cc",
"name": "Sachin T S",
"email": "sachinsuresh704@gmail.com"
},
"to_uid": null
}
],
"hasMore": true
}
}
}
Error
{
"errors": [
{
"message": "Unauthorized",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": ["list_all_transactions"]
}
],
"data": {
"list_all_transactions": null
}
}