Preview Leffel Consulting Payments is in active development and migrating to Finix — the API isn't publicly live yet, and some examples still reflect the outgoing build. Request early access →

Guides

Onboard a merchant

Create a merchant's connected account, send them through hosted onboarding, and confirm they can accept charges.

Before a business can accept payments, it needs a connected account — its own payment account, where it is the merchant of record. Onboarding is a three-step flow.

1. Create the connected account

curl https://payments.leffelconsulting.com/v1/onboarding/account \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{ "email": "owner@acme.com", "country": "US" }'

This is idempotent — calling it again returns the existing account. The response includes the stripeAccountId (acct_…) and the current onboardingStatus.

2. Send the merchant through hosted onboarding

Generate a hosted onboarding link and redirect the merchant to it. They complete identity and bank details with the processor — no sensitive data touches your systems.

curl https://payments.leffelconsulting.com/v1/onboarding/account-link \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "refreshUrl": "https://acme.com/onboard/refresh",
    "returnUrl":  "https://acme.com/onboard/done"
  }'

The url in the response is where you send the merchant. refreshUrl is used if the link expires; returnUrl is where they land when finished.

3. Confirm they can accept charges

Onboarding status moves through these states:

StatusMeaning
not_startedNo account yet.
pendingAccount created, identity/bank details incomplete.
charges_onlyCan accept charges; payouts not yet enabled.
enabledFully enabled — charges and payouts.
restrictedDisabled by the processor; see requirements.

Check status on demand, or keep it fresh automatically via the account.updated callback:

curl https://payments.leffelconsulting.com/v1/onboarding/status \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX"

Note

Wait until chargesEnabled is true before creating payments for that merchant. Use POST /v1/onboarding/refresh to pull the latest state immediately instead of waiting for a webhook.

Next: Accept an online payment.