paymentRail.
Two ways to pay
Send exactly one of
payableId or contactId. Every payment request needs an Idempotency-Key header and the payments:initiate scope. Choose what to pay from as described in Funding sources.
Statuses
A
returned payment is not a failed payment: the vendor kept the money. A refund_pending payment is not money back yet.
Holds
A payment isheld when Cleo collected the money but the vendor cannot receive it yet.
Cleo sends a held payment once the vendor accepts the invitation or adds a bank. Holds have three rules:
- A hold is funded from a bank, never from the Cleo Pay balance.
- A hold cannot be scheduled.
- You can cancel a hold. See Cancel and retry.
paymentReadiness on the contact before you pay to avoid holds. See Contacts.
Splits
Cleo can split a large amount into several transfers. The create response lists every one, and theiramountCents add up to the amount you asked for. Each split is its own payment with its own id and status. Paying a bill whose total is above $50,000 is refused.
Scheduling
scheduledAt (YYYY-MM-DD) runs the payment on a future date at 9:00 AM New York time. The date must be a real calendar date, at least tomorrow, and within the business’s scheduling window. Scheduling is available on the Dwolla rail only, and not for a payment that would be held.
Clearing speed
On the Dwolla rail,clearing can be STANDARD or NEXT_AVAILABLE. When you omit it, the business’s default applies. Choosing a speed requires clearing selection to be turned on for the business. Cleo Pay chooses its ACH speed itself, and clearing is refused on that rail.
The payment object
Reading payments
GET /v1/payments lists every payment the business sent, newest first: held, returned, refunded and cancelled ones included, and every split and retry as its own payment. Filter by payableId, contactId, status, createdAfter and createdBefore. GET /v1/payments/{paymentId} reads one. Both need payments:read, and a payables:read key can read them too.
Payments that did not change keep their place across pages, so walking the pages neither repeats nor skips them.
Events
Each payment sendspayment.processing, payment.held, payment.completed, payment.failed, payment.returned, payment.refund_pending, payment.refunded and payment.cancelled as it moves. The event names the payment’s id. Fetch the payment for its current state. See Webhooks.