Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cleo-pay.com/llms.txt

Use this file to discover all available pages before exploring further.

You need at least one verified bank account before you can initiate payments. Cleo Pay supports two connection methods: instant connection via Plaid or manual entry with micro-deposit verification.

List your bank accounts

To view all bank accounts currently connected to your business:
curl https://api.cleo-pay.com/api/bank-accounts \
  -H "Authorization: Bearer YOUR_TOKEN"

Connect a bank account

Plaid connects your bank account instantly using your online banking credentials. No waiting for deposits.
1

Get a Plaid Link token

Request a short-lived link token. Your frontend uses this token to open the Plaid Link UI.
curl https://api.cleo-pay.com/api/bank-accounts/plaid-link-token \
  -H "Authorization: Bearer YOUR_TOKEN"
The response includes a linkToken string. Pass this to the Plaid Link SDK in your application.
2

Open Plaid Link

Initialize the Plaid Link widget with the token from the previous step. When the user completes the Plaid flow, Plaid returns a publicToken and an accountId.
Integrating the Plaid Link UI is handled client-side using Plaid’s JavaScript SDK. See Plaid’s documentation for implementation details.
3

Submit the Plaid token to Cleo Pay

Exchange the Plaid publicToken and accountId to finalize the connection:
curl -X POST https://api.cleo-pay.com/api/bank-accounts/connect-plaid \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "publicToken": "public-sandbox-abc123",
    "accountId": "plaid_account_xyz"
  }'
On success, the response includes a fundingSourceId for the connected account. The account is immediately available for payments.

Set a default bank account

Your default bank account is used automatically when initiating payments unless you specify a different one. Set a default with:
curl -X PATCH https://api.cleo-pay.com/api/bank-accounts/fs_abc123/set-as-default \
  -H "Authorization: Bearer YOUR_TOKEN"

Re-authenticate an expired connection

Plaid connections can expire if you change your banking password or revoke access. When this happens, your account status changes to needs_reauth. Re-authenticate using a fresh Plaid Link session:
1

Get a re-auth link token

curl https://api.cleo-pay.com/api/bank-accounts/fs_abc123/reauth-token \
  -H "Authorization: Bearer YOUR_TOKEN"
2

Complete the Plaid re-auth flow

Use the returned token to open Plaid Link in update mode. After the user completes the flow, submit the new public token:
curl -X POST https://api.cleo-pay.com/api/bank-accounts/fs_abc123/reauth \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "publicToken": "public-sandbox-refreshed456"
  }'

Remove a bank account

To disconnect a bank account from your business:
curl -X DELETE https://api.cleo-pay.com/api/bank-accounts/fs_abc123 \
  -H "Authorization: Bearer YOUR_TOKEN"
You cannot remove a bank account that is set as the default if other accounts are connected. Set a different account as default first.