Search for existing payment destinations. This is a simple GET request that returns an array of matching destinations.

You can search just by simply putting in the name and the search will return a list of potential payees. You may also just leave it empty and it will return all.

const client = new Paymanai({
  xPaymanAPISecret: process.env["PAYMAN_API_SECRET"],
  environment: "sandbox",
});

// Get all destinations
const allDestinations = await client.payments.searchDestinations();

// Or filter with optional parameters
const filteredDestinations = await client.payments.searchDestinations({
  name: "John", // Partial match works
  contactEmail: "[email protected]",
  type: "US_ACH",
});

Response returned

[
  {
    id: "dest_123abc",
    name: "John Doe",
    type: "US_ACH",
    organizationId: "org_xyz",
    status: "ACTIVE",
    contactDetails: {
      contactType: "individual",
      email: "[email protected]",
      phoneNumber: "+1234567890",
      address: "123 Main St",
      taxId: "123-45-6789",
    },
    tags: ["primary"],
  },
  // ... more destinations
];

Search Filters

Filter results by including any of these parameters:

  • name: Partial match for destination name
  • accountNumber: Bank account number
  • routingNumber: Bank routing number
  • contactEmail: Email address
  • contactPhoneNumber: Phone number
  • contactTaxId: Tax ID
  • type: “US_ACH” or “CRYPTO_ADDRESS”