API Reference
Onboarding
Onboard a merchant as a Standard connected account (merchant of record). Create the account, send the merchant through Stripe-hosted onboarding, and check whether they can accept charges and payouts.
Create a connected account
/v1/onboarding/account Creates the merchant’s Standard connected account. Idempotent — returns the existing account if one already exists.
X-Api-Key Request body
email string optional Optional merchant email to prefill onboarding.
country string optional Two-letter country code. Defaults to "US".
Returns
stripeAccountId string optional Connected account id (acct_…).
onboardingStatus string optional not_started, pending, charges_only, enabled, or restricted.
chargesEnabled boolean optional Whether the account can accept charges.
payoutsEnabled boolean optional Whether the account can receive payouts.
requirements string | null optional Outstanding onboarding requirements, if any.
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" }' {
"stripeAccountId": "acct_1Nvo...",
"onboardingStatus": "pending",
"chargesEnabled": false,
"payoutsEnabled": false,
"requirements": "currently_due: business_profile.url"
} Create an onboarding link
/v1/onboarding/account-link Returns a Stripe-hosted onboarding URL to send the merchant to. Create the connected account first.
X-Api-Key Request body
refreshUrl string required URL Stripe returns the merchant to if the link expires.
returnUrl string required URL Stripe returns the merchant to when onboarding completes.
Returns
url string optional The hosted onboarding URL — redirect the merchant here.
Errors
-
400No connected account — Create the connected account first (POST /v1/onboarding/account).
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" }' { "url": "https://connect.stripe.com/setup/e/acct_1Nvo.../..." } Get onboarding status
/v1/onboarding/status Returns the merchant’s current onboarding state, kept fresh by account.updated webhooks.
X-Api-Key Returns
stripeAccountId string optional Connected account id (acct_…).
onboardingStatus string optional not_started, pending, charges_only, enabled, or restricted.
chargesEnabled boolean optional Whether the account can accept charges.
payoutsEnabled boolean optional Whether the account can receive payouts.
requirements string | null optional Outstanding onboarding requirements, if any.
curl https://payments.leffelconsulting.com/v1/onboarding/status \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" {
"stripeAccountId": "acct_1Nvo...",
"onboardingStatus": "enabled",
"chargesEnabled": true,
"payoutsEnabled": true,
"requirements": null
} Refresh onboarding status
/v1/onboarding/refresh Re-pulls the latest account state from Stripe on demand (rather than waiting for a webhook).
X-Api-Key Returns
stripeAccountId string optional Connected account id (acct_…).
onboardingStatus string optional not_started, pending, charges_only, enabled, or restricted.
chargesEnabled boolean optional Whether the account can accept charges.
payoutsEnabled boolean optional Whether the account can receive payouts.
Errors
-
400No connected account — This tenant has no connected account.
curl -X POST https://payments.leffelconsulting.com/v1/onboarding/refresh \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" {
"stripeAccountId": "acct_1Nvo...",
"onboardingStatus": "enabled",
"chargesEnabled": true,
"payoutsEnabled": true
}