GET
/
payoutRequests
curl --request GET \
  --url https://prod.api.palomma.com/v0/payoutRequests \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "id": "01HPR8QBF5QKA313RPBSKYB7DS",
      "reference": "<string>",
      "customerId": "01HPR57X6QR5ZRKEEKBSDBW4RA",
      "customerDetails": {
        "reference": "<string>",
        "name": "Pepito Perez",
        "documentType": "cc",
        "documentNumber": "1037551022",
        "email": "pepito@gmail.com",
        "phoneNumber": "3013111111"
      },
      "payoutTargetId": "01HPR8S7YF43PV3QV16TZDC80P",
      "payoutTargetDetails": {
        "reference": "<string>",
        "description": "<string>",
        "type": "bankAccount"
      },
      "status": "processing",
      "statusMessage": "AUTHENTICATION_FAILED",
      "amount": 100000,
      "amountSent": 100000,
      "fee": 500,
      "sourceMerchantAccountId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "cursor": "fa4c20cf2b51f6a45377c98271e3754da1e29b6827928a8e0b40da5a7d53c971aa22c50b2c8ce83484a0dd36ee0e2570a0520a4f1f4817962d95ba65059b9a28da1a5d4ac7bfe7628fb917efd20608656da58b412ea758ec341cd6dfb226f8be263cefa811848b859a5a71f90f47533e01e969d49c0ac9e4e944b3d0fbd4e207",
  "count": 123
}

This endpoint is paginated to improve its performance. The example below shows how to fetch multiple pages.

import axios from "axios";

const getPage = async (input: { limit?: number; cursor?: string }) => {
  const response = await axios.get(
    "https://prod.api.palomma.com/v0/payoutRequests",
    {
      headers: {
        Authorization: "Bearer <token>",
      },
      params: {
        ...input,
      },
    }
  );
  if (!response.data) throw new Error();
  const { items, cursor, count } = response.data;
  return { items, cursor, count };
};

const getAll = async (input: { limit?: number }) => {
  let items: any[] = [];
  const firstPage = await getPage({ limit: input.limit });
  if (firstPage) {
    items = items.concat(firstPage.items);
    let currentCursor = firstPage.cursor;
    while (currentCursor !== null) {
      const nextPage = await getPage({
        limit: input.limit,
        cursor: currentCursor,
      });
      items = items.concat(nextPage.items);
      currentCursor = nextPage.cursor;
    }
  }
  return items;
};

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

reference
string

Filter by reference provided on creation.

customerId
string

Filter by customerId.

payoutTargetId
string

Filter by payoutTargetId.

limit
integer

Number of records to return. Default is 20. Maximum is 100.

cursor
string

A cursor for use in pagination. The cursor indicates where to start fetching the results.

Response

200 - application/json
items
object[]
cursor
string | null

A cursor for use in pagination. Provide this value in the cursor parameter to retrieve the next set of results. When there are no more results, the cursor will be null.

count
integer

The total number of items returned.