---
updatedAt: 2026-03-13T17:01:00.000Z
agentTools:
  projectIndex: https://developers.masspay.io/llms.txt
---

# All Users' Transactions history

This **GET** endpoint is used to retrieve a list of all transactions, including payouts, loads, and spendbacks, for all users. <br> You can use this endpoint to obtain a comprehensive history of transactions for all users, allowing you to track and analyze their payment activities over time. <br> The response will contain a JSON array of transaction objects, each including transactions details.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "description": "MassPay API",
    "version": "1.0.0",
    "title": "MassPay API",
    "termsOfService": "https://www.masspay.io/terms/",
    "contact": {
      "name": "MassPay",
      "email": "info@masspay.io",
      "url": "https://www.masspay.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "tags": [
    {
      "name": "User",
      "description": "A user represents an individual or a business that can receive payments, such as employees, survey participants, contractors, or distributors. Users can withdraw funds using any of MassPay's supported payout options, including but not limited to bank accounts, debit card, PayPal account, prepaid cards, cash pickup locations, mobile wallets, etc. All payout options for a user are attached to their user resource, so you will always need to create users."
    }
  ],
  "paths": {
    "/payout/user/history": {
      "parameters": [],
      "get": {
        "summary": "All Users' Transactions history",
        "operationId": "getAllUsersHistory",
        "description": "This **GET** endpoint is used to retrieve a list of all transactions, including payouts, loads, and spendbacks, for all users. <br> You can use this endpoint to obtain a comprehensive history of transactions for all users, allowing you to track and analyze their payment activities over time. <br> The response will contain a JSON array of transaction objects, each including transactions details.",
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Unique key to prevent duplicate processing"
          },
          {
            "schema": {
              "type": "number",
              "default": 10,
              "maximum": 100,
              "minimum": 0
            },
            "in": "query",
            "name": "number_of_records",
            "description": "Number of records to return. Defaults to 10 if no value is provided"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[\\d]{4}-[\\d]{2}-[\\d]{2}$",
              "example": "2020-03-31",
              "format": "date"
            },
            "in": "query",
            "name": "start_date",
            "description": "Starting date"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[\\d]{4}-[\\d]{2}-[\\d]{2}$",
              "example": "2020-03-31",
              "format": "date"
            },
            "in": "query",
            "name": "end_date",
            "description": "Ending date"
          },
          {
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "description": "Page number"
          },
          {
            "schema": {
              "type": "string",
              "example": "payout",
              "enum": [
                "payout",
                "load",
                "spendback",
                "payin"
              ]
            },
            "in": "query",
            "name": "type",
            "description": "Filter particular types of transactions. Comma separated to include multiple types",
            "style": "form"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "wallet_token",
            "description": "Filter transactions to include only provided wallet token."
          },
          {
            "schema": {
              "type": "boolean",
              "default": false
            },
            "in": "query",
            "name": "show_all_clients",
            "description": "Whether to show transactions from all clients"
          }
        ],
        "responses": {
          "200": {
            "description": "Succesful operation.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TxnHistoryRecordResp"
                  }
                },
                "examples": {
                  "All Transactions Response": {
                    "value": [
                      {
                        "token": "payout_123e4567-e89b-12d3-a456-426614174000",
                        "type": "payout",
                        "time_of_txn": "2019-08-24T14:15:22Z",
                        "source_amount": 50.1,
                        "source_currency_code": "USD",
                        "destination_amount": 44.99,
                        "destination_currency_code": "MXN",
                        "fee": 2.98,
                        "status": "READY_FOR_PICKUP",
                        "notes": "Purchase of Candles. Order #14930",
                        "payer_name": "Elektra",
                        "pickup_code": "343432",
                        "source_token": "clnt_wlt_123e4567-e89b-12d3-a456-426614174000",
                        "destination_token": "dest_123e4567-e89b-12d3-a456-426614174000",
                        "delivery_type": "CASH_PICKUP",
                        "client_transfer_id": "4erew-rre2",
                        "status_reason": "Success",
                        "client_id": 0,
                        "user_token": "usr_87e7599d-af96-4aec-9097-c2a105bc2d64",
                        "destination_country": "MEX"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error404"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error405"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Time-out.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error504"
                }
              }
            }
          }
        },
        "security": [
          {
            "AUTHORIZER_NAME": []
          },
          {
            "api_key": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://{environment}.masspay.io/{VERSION}",
      "description": "MassPay's API server",
      "variables": {
        "VERSION": {
          "default": "v1.0.0",
          "enum": [
            "v1.0.0"
          ]
        },
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "staging-api"
          ]
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "TxnHistoryRecordResp": {
        "title": "TxnHistoryRecordResp",
        "type": "object",
        "description": "Record that represents a transaction",
        "x-tags": [
          "User"
        ],
        "required": [
          "token",
          "type",
          "time_of_txn",
          "source_amount",
          "source_currency_code",
          "destination_amount",
          "destination_currency_code",
          "fee",
          "status",
          "destination_token"
        ],
        "properties": {
          "token": {
            "type": "string",
            "format": "uuid",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Token represnting the transaction"
          },
          "type": {
            "type": "string",
            "enum": [
              "load",
              "payout",
              "spend back",
              "info",
              "payin"
            ],
            "example": "payout",
            "description": "Type of transaction"
          },
          "time_of_txn": {
            "type": "string",
            "format": "date-time",
            "description": "Time of this history entry, in UTC. For most entries this is when the transaction was created; for the CANCELLED entry of a cancelled payout it is when the cancellation happened and the funds came back."
          },
          "source_amount": {
            "type": "number",
            "format": "float",
            "example": 50.1,
            "description": "Source amount"
          },
          "source_currency_code": {
            "type": "string",
            "default": "USD",
            "description": "The currency originating balance is stored in. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. In most cases this value will be USD, and therefore the defaut value if none is provided",
            "example": "USD",
            "minLength": 3,
            "maxLength": 3
          },
          "destination_amount": {
            "type": "number",
            "format": "float",
            "example": 44.99,
            "description": "The amount that was received in `destination_currency_code`"
          },
          "destination_currency_code": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "description": "The currency of the funds received. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format"
          },
          "fee": {
            "type": "number",
            "format": "float",
            "example": 2.98,
            "description": "Fee of the transaction"
          },
          "status": {
            "type": "string",
            "description": "Status of the transaction. A cancelled payout appears twice in the history: the original entry with `CANCELLED_AT_LATER_TIME` at the time it was created, and a second entry with `CANCELLED` at the time the cancellation happened and the funds came back. The payout itself has the single status `CANCELLED`, which is what the payout status endpoint and the payout webhook report.",
            "example": "READY_FOR_PICKUP",
            "enum": [
              "PENDING",
              "EXPIRED",
              "PROCESSING",
              "COMPLETED",
              "CANCELLED",
              "SCHEDULED",
              "READY_FOR_PICKUP",
              "HOLD",
              "ERROR",
              "CANCELLED_AT_LATER_TIME",
              "RETURNED"
            ]
          },
          "notes": {
            "type": "string",
            "description": "Notes of the transaction when load or spend back",
            "example": "Purchase of Candles. Order #14930"
          },
          "payer_name": {
            "type": "string",
            "description": "Name of the payer when payout transaction",
            "example": "Elektra"
          },
          "pickup_code": {
            "type": "string",
            "description": "Code/pin that is required when collecting the money when payout transaction",
            "example": "343432"
          },
          "source_token": {
            "type": "string",
            "format": "uuid",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Token that represents the funding source i.e. bank account, wallet. 36 characters long"
          },
          "destination_token": {
            "type": "string",
            "format": "uuid",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Token that represents the payout destination i.e. MassPay->Brazil->Bank Deposit->Itau. To be retrieved from the #pricing callback. If not provided, the last destination that was used for this user will be used. 36 characters long"
          },
          "delivery_type": {
            "type": "string",
            "enum": [
              "CASH_PICKUP",
              "BANK_DEPOSIT",
              "HOME_DELIVERY",
              "MOBILE_WALLET",
              "MASSPAY_CARD",
              "PAPER_CHECK",
              "BILL",
              "CRYPTOCURRENCY"
            ],
            "description": "The type of service. I.e. cash pickup, home delivery, etc. Only provided for payouts"
          },
          "client_transfer_id": {
            "type": "string",
            "description": "A client defined transfer identifier. This is the unique ID assigned to the transfer on your system. Max 50 characters. A value another payout of yours already carries is rejected with `400 Bad request` and `Duplicate client id. Existing payout token: payout_<uuid>` in `error.details`. By default a value becomes reusable once the earlier payout is `ERROR` or `EXPIRED` (or is a `PENDING` quote past its expiration); any other status, including `CANCELLED`, keeps it reserved. Accounts configured for strict uniqueness never allow reuse, whatever the earlier payout's status.",
            "maxLength": 50
          },
          "status_reason": {
            "type": "string",
            "description": "The reason for the status change. Usually would include reason for an ERROR or CANCEL status"
          },
          "client_id": {
            "type": "integer",
            "description": "Optional client id"
          },
          "user_token": {
            "type": "string",
            "description": "User token representing the user this transaction belongs to. For a `payout` initiated on behalf of a sender, the payee: such a payout is listed in the payee's history and in the sender's own, both times naming the payee here and the sender in `sender_user_token`."
          },
          "destination_country": {
            "type": "string",
            "description": "3 letters ISO code for destination country"
          },
          "sender_user_token": {
            "type": "string",
            "pattern": "^usr_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "minLength": 40,
            "maxLength": 40,
            "description": "Token that represents the user who is the sender (originator) of this payout, prefixed with `usr_`. Only returned for `payout` entries that were initiated on behalf of a sender (with a `sender_user_token`), in the payee's history as in the sender's own; absent when the client is the sender of record and for every other entry type.",
            "example": "usr_7f8e9d0c-1b2a-4c3d-9e5f-6a7b8c9d0e1f"
          },
          "sender_first_name": {
            "type": "string",
            "description": "First name of the sender. Only returned together with `sender_user_token`.",
            "example": "John"
          },
          "sender_last_name": {
            "type": "string",
            "description": "Last name of the sender. Only returned together with `sender_user_token`.",
            "example": "Doe"
          },
          "sender_business_name": {
            "type": "string",
            "description": "Business name of the sender, when the sender is a business. Only returned together with `sender_user_token`.",
            "example": "Acme Inc."
          }
        }
      },
      "Error400": {
        "description": "Bad request.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Bad request."
            ],
            "example": "Bad request."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The request was invalid or malformed. Please ensure that the request body conforms to the required format and that all required parameters are included."
            ],
            "example": "The request was invalid or malformed. Please ensure that the request body conforms to the required format and that all required parameters are included."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              400
            ],
            "example": 400
          },
          "error": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "example": "Error initiating payout",
                "description": "Reason for error"
              },
              "details": {
                "type": "array",
                "description": "Specific details of the cause of the error",
                "items": {
                  "type": "string",
                  "example": "Source amount cannot be $0"
                }
              }
            }
          }
        },
        "required": [
          "message",
          "code"
        ]
      },
      "Error401": {
        "description": "Unauthorized.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Unauthorized."
            ],
            "example": "Unauthorized."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "Authentication failed or credentials were not provided. Please ensure that you have provided valid API credentials and that they are authorized to access the MassPay API."
            ],
            "example": "Authentication failed or credentials were not provided. Please ensure that you have provided valid API credentials and that they are authorized to access the MassPay API."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              401
            ],
            "example": 401
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error403": {
        "description": "Forbidden.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Forbidden."
            ],
            "example": "Forbidden."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The requested action is not allowed or the API credentials do not have sufficient permissions. Please ensure that the API credentials used for the request have the necessary permissions to perform the requested action."
            ],
            "example": "The requested action is not allowed or the API credentials do not have sufficient permissions. Please ensure that the API credentials used for the request have the necessary permissions to perform the requested action."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              403
            ],
            "example": 403
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error404": {
        "description": "Not found.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Not found."
            ],
            "example": "Not found."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The requested resource was not found. Please ensure that the URL for the request is correct and that the requested resource exists."
            ],
            "example": "The requested resource was not found. Please ensure that the URL for the request is correct and that the requested resource exists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              404
            ],
            "example": 404
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error405": {
        "description": "Method not allowed.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Method not allowed."
            ],
            "example": "Method not allowed."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The HTTP method used for the request is not supported by the MassPay API. Please ensure that you are using the correct HTTP method (e.g., POST) for the specific MassPay API endpoint."
            ],
            "example": "The HTTP method used for the request is not supported by the MassPay API. Please ensure that you are using the correct HTTP method (e.g., POST) for the specific MassPay API endpoint."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              405
            ],
            "example": 405
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error500": {
        "description": "Internal server error",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Internal server error."
            ],
            "example": "Internal server error."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "An unexpected error occurred on the server-side while processing the request. Please try again later or contact support if the issue persists."
            ],
            "example": "An unexpected error occurred on the server-side while processing the request. Please try again later or contact support if the issue persists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              500
            ],
            "example": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error504": {
        "description": "Gateway Time-out.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Gateway Time-out."
            ],
            "example": "Gateway Time-out."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The request timed out while waiting for a response from the server. Please try again later or contact support if the issue persists."
            ],
            "example": "The request timed out while waiting for a response from the server. Please try again later or contact support if the issue persists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              500
            ],
            "example": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "AUTHORIZER_NAME": {
        "name": "Authorization",
        "in": "header",
        "type": "apiKey"
      }
    }
  }
}
```