Skip to main content
GET
https://api.sandbox.wepayout.com.br
/
v2
/
payout
/
payments
List Payment
curl --request GET \
  --url https://api.sandbox.wepayout.com.br/v2/payout/payments \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 54321,
      "merchant_id": 1234,
      "amount": 10000,
      "currency": "BRL",
      "country": "BR",
      "description": "Payment for services rendered",
      "recipient": {
        "name": "João Silva",
        "email": "[email protected]",
        "document": {
          "type": "CPF",
          "number": "12345678900"
        },
        "bank_account": {
          "bank_code": "001",
          "branch": "1234",
          "account": "12345678",
          "account_digit": "9",
          "account_type": "checking"
        }
      },
      "status": {
        "id": 3,
        "name": "Paid"
      },
      "external_id": "ORDER-12345",
      "notification_url": "https://your-domain.com/webhook/payout",
      "created_at": "2024-06-13T10:00:00.000000Z",
      "updated_at": "2024-06-13T10:05:00.000000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "per_page": 15,
    "to": 15,
    "total": 73
  },
  "links": {
    "first": "https://api.sandbox.wepayout.com.br/v2/payout/payments?page=1",
    "last": "https://api.sandbox.wepayout.com.br/v2/payout/payments?page=5",
    "prev": null,
    "next": "https://api.sandbox.wepayout.com.br/v2/payout/payments?page=2"
  }
}

List Payment

List all payout payments with optional filters.

Query Parameters

merchant_id
integer
Filter by merchant ID.Min: 2, Max: 10000
external_id
string
Filter by your internal reference ID.Max length: 255 characters
status_id
integer
Filter by status ID.
created_at_start
string
Filter payments created after this date. Format: YYYY-MM-DD
created_at_end
string
Filter payments created before this date. Format: YYYY-MM-DD
updated_at_start
string
Filter payments updated after this date. Format: YYYY-MM-DD
updated_at_end
string
Filter payments updated before this date. Format: YYYY-MM-DD
page
integer
Page number for pagination.Default: 1
per_page
integer
Number of items per page.Default: 15, Max: 100
sort_by
string
Field to sort by.Allowed values: id, created_at, updated_at, amountDefault: id
sort_order
string
Sort order.Allowed values: asc, descDefault: desc

Response

Returns an array of payout payment objects with pagination metadata.
data
array
Array of payout payment objects.
meta
object
Pagination metadata.
Pagination links.

Request Example

curl --request GET \
  --url 'https://api.sandbox.wepayout.com.br/v2/payout/payments?page=1&per_page=15' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer 123'
{
  "data": [
    {
      "id": 54321,
      "merchant_id": 1234,
      "amount": 10000,
      "currency": "BRL",
      "country": "BR",
      "description": "Payment for services rendered",
      "recipient": {
        "name": "João Silva",
        "email": "[email protected]",
        "document": {
          "type": "CPF",
          "number": "12345678900"
        },
        "bank_account": {
          "bank_code": "001",
          "branch": "1234",
          "account": "12345678",
          "account_digit": "9",
          "account_type": "checking"
        }
      },
      "status": {
        "id": 3,
        "name": "Paid"
      },
      "external_id": "ORDER-12345",
      "notification_url": "https://your-domain.com/webhook/payout",
      "created_at": "2024-06-13T10:00:00.000000Z",
      "updated_at": "2024-06-13T10:05:00.000000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "per_page": 15,
    "to": 15,
    "total": 73
  },
  "links": {
    "first": "https://api.sandbox.wepayout.com.br/v2/payout/payments?page=1",
    "last": "https://api.sandbox.wepayout.com.br/v2/payout/payments?page=5",
    "prev": null,
    "next": "https://api.sandbox.wepayout.com.br/v2/payout/payments?page=2"
  }
}

Use Cases

Retrieve all payouts with pagination:
async function getAllPayouts(page = 1, perPage = 15) {
  const response = await listPayouts({ page, perPage });
  return response;
}
Get payouts by specific status:
async function getPayoutsByStatus(statusId) {
  const response = await listPayouts({ status_id: statusId });
  return response.data;
}

// Get paid payouts (status_id = 3)
const paidPayouts = await getPayoutsByStatus(3);
Find a specific payout by your internal reference:
async function findPayoutByExternalId(externalId) {
  const response = await listPayouts({ external_id: externalId });
  return response.data[0]; // Return first match
}
Generate a report for a specific date range:
async function getPayoutsReport(startDate, endDate) {
  const response = await listPayouts({
    created_at_start: startDate,
    created_at_end: endDate,
    per_page: 100,
    sort_by: 'created_at',
    sort_order: 'asc'
  });
  
  return response;
}

// Get payouts from January 2024
const report = await getPayoutsReport('2024-01-01', '2024-01-31');
Handle pagination to retrieve all payouts:
async function getAllPayoutsWithPagination() {
  let allPayouts = [];
  let currentPage = 1;
  let hasMorePages = true;
  
  while (hasMorePages) {
    const response = await listPayouts({
      page: currentPage,
      per_page: 100
    });
    
    allPayouts = allPayouts.concat(response.data);
    
    hasMorePages = response.meta.current_page < response.meta.last_page;
    currentPage++;
  }
  
  return allPayouts;
}

Status IDs

Common payout status IDs for filtering:
IDStatus NameDescription
1CreatedPayout has been created
2ProcessingPayout is being processed
3PaidPayout has been paid successfully
4FailedPayout failed
5RejectedPayout rejected by compliance
6CancelledPayout was cancelled

Best Practices

Pagination: Always use pagination when listing payouts to avoid performance issues. The default page size is 15, with a maximum of 100 items per page.
Date Filters: When using date range filters, ensure the range is not too large to avoid timeouts. For large date ranges, consider breaking them into smaller chunks.
Caching: Consider caching the results for frequently accessed pages to reduce API calls and improve performance.