Get All Payees

Use our API to get all saved payee profile data.

Use this guide to get an array of saved Payee Vault profile data, filtered and sorted to your specifications. See Get All Payees in API Reference for field definitions.

Please note: This API resource is intended for a specific use case and requires integration through the Maast product team. To use this resource, please contact Maast Customer Support.

Prerequisites

  1. Contact Maast Customer Support to configure your account for this resource.
  2. Follow the Get Started guide to open your sandbox and get your test credentials.
  3. See Authentication to format the credentials and generate your API token. (Alternatively, use the credentials as-is to test this endpoint with our 'Try It!' feature.)
  4. Follow the steps in the Add a Payee guide to add at least one payee profile to the Payee Vault.

Implement

Write a GET request to send to the /platform/vault/payee endpoint. See the sample code below:

curl --request GET \
     --url https://api-test.maast.com/platform/vault/payee \
     --header 'accept: application/json' \
     --header 'authorization: Basic OjllZGVjMjFhMzFjMHh5ejc4OWUzMGEzNDE2YWJjMTIz'

The above code requests all Payee Vault objects for your account, using default sorting and no filtering.

The following sections describe several query parameters that you can add to your request to sort and filter the response. To add these parameters, append them to the request endpoint URL, preceded by ? and separated by &.

Sort

Use the following parameters to sort the data in the response:

  • order_on - Include this to sort results by a certain field. For example, to sort by payee ID, write order_on=payee_id. All available fields are listed in the data array in the response model for this request's API Reference.
  • order_by - Include this to sort the specified field by ascending order (asc) or descending order (desc).

Filter

Use the following parameters to filter the response:

  • filter - Include this to narrow results by requiring certain fields to meet specified values. You can combine multiple filters. Each filter contains three properties, packed together with commas:
    • field name - All available fields are listed in the response model of this request's API Reference.
    • filter conditional - Find supported filter conditionals in About Our APIs: Filters.
    • the value on which to filter
  • count - Include this to set the number of records in the result.
  • page - Include this to choose a page to display when there are more results than the count parameter.
  • merchant_id - If you are sending this request on behalf of another merchant, include their merchant ID here.

🚧

When placing strings in URLs, be sure to use your development language's URL encoding methods (e.g., for hexadecimal, use %2C in lieu of a comma).


Example Request

Once configured, the code for your request will resemble the following sample code:

curl --request GET \
     --url 'https://api-test.maast.com/platform/vault/payee?count=10&order_on=payee_id&order_by=desc&page=0&merchant_id=210000000289' \
     --header 'accept: application/json' \
     --header 'authorization: Basic OjllZGVjMjFhMzFjMHh5ejc4OWUzMGEzNDE2YWJjMTIz'

Integrate

Once you have sent your request, you will receive a response like this from the Maast server:

{
  "code": 0,
  "message": "Success",
  "totalPages": 1,
  "totalRecords": 1,
  "data": [
    {
      "payee_id": 999678,
      "payee_name": "John Doe",
      "payee_phone": "+16500000000",
      "payee_email": [
        "[email protected]",
        "[email protected]"
      ],
      "payee_address": {
        "address1": "4w 4th Ave",
        "address2": "Suite #404",
        "city": "San Mateo",
        "state": "CA",
        "zip": "94404",
        "country_code": "840",
        "country": "United States"
      },
      "payee_account": {
        "type_id": "S",
        "tr_number": "028000082",
        "dda_number": "3456776866",
        "accountholder_name": "John Doe",
        "verified_date": "2022-02-01T10:28:55.000015-08:00"
      }
    }
  ]
}

Check the code field in the request response: 0 confirms a successful transaction. If the value is something other than 0, check Platform API Response Codes in Reference.

The data field shows an array of payees and their data. The sample response above shows data for one payee.

See Get All Payees in API Reference for response field definitions.


Test and Go Live

See our Test and Go Live guide to test your API integration and to start transacting with an active production account.