Send Payment

AI Agent sending funds to a specified payment destination. You can add a Payee in the Payman AI dashboard for an ID. You can also use the SDK to search for all payee’s that your AI can find for quick payments.

const client = new Paymanai({
  xPaymanAPISecret: process.env["PAYMAN_API_SECRET"], // This is the default and can be omitted
  environment: "sandbox", // defaults to 'sandbox'
});

client.payments.sendPayment({
  amountDecimal: 50.0, //required in decimal format
  customerId: "cust_123", // optional
  customerEmail: "[email protected]", // optional
  customerName: "John Doe", // optional
  memo: "Service payment",
  paymentDestinationId: "dest_123", // either this or `paymentDestination` object
});

Payment Destination Object

When no payment destination added your AI Agent can add the details itself.

client.payments.sendPayment({
  amountDecimal: 100.0,
  paymentDestination: {
    type: "US_ACH",
    accountHolderName: "John Doe",
    accountNumber: "123456789",
    accountType: "checking",
    routingNumber: "987654321",
    name: "Primary Checking Account",
    contactDetails: {
      contactType: "individual",
      email: "[email protected]",
      phoneNumber: "+1234567890",
      address: "123 Main St, City, State 12345",
      taxId: "123-45-6789",
    },
  },
});

Field Descriptions

Required Fields
  • type: Must be ‘US_ACH’ for ACH transfers
  • accountHolderName: Legal name of the account holder
  • accountNumber: Bank account number
  • accountType: Type of bank account (checking or savings)
  • routingNumber: 9-digit ABA routing number
  • name: Descriptive name for the payment destination
Optional Fields
  • tags: Array of strings for categorizing the payment destination
  • contactDetails: Object containing contact information:
  • contactType: Either ‘individual’ or ‘business’
  • email: Contact email address
  • phoneNumber: Contact phone number
  • address: Full mailing address
  • taxId: Tax identification (SSN for individuals, EIN for businesses)