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 →

API Reference

Payments

Create and manage payments. A payment is a direct charge on the merchant’s connected account with the platform fee attached; you receive a stable lcPaymentId and a clientSecret to complete the charge in the browser.

Create a payment

POST /v1/payments/intents

Creates a PaymentIntent on the merchant’s connected account and returns the details needed to collect payment in the browser (Payment Element) or at a Terminal reader. Requires an Idempotency-Key header so retries never double-charge.

Auth: X-Api-Key Requires: Idempotency-Key

Request body

amountCents integer required

Amount in the smallest currency unit (cents). Min 50, max 5,000,000.

currency string optional

ISO currency code. Defaults to "usd".

captureMethod string optional

"automatic" (default) or "manual" for authorize-now/capture-later.

paymentMethodTypes string[] optional

Optional. e.g. ["card"], ["us_bank_account"] for ACH, ["klarna"]. Omit to enable Stripe automatic payment methods.

customerRef string optional

Optional customer identifier passed to the processor.

orderRef string optional

Optional. Your order id — stored as metadata and echoed back.

description string optional

Optional payment description.

branch string optional

Optional branch/location tag, stored as metadata.

idempotencyKey string optional

Optional. Forwarded to the processor as its native idempotency key (separate from the Idempotency-Key header).

Returns

lcPaymentId string optional

Stable payment id (lcpay_…). Store this as your reference.

clientSecret string optional

Pass to Stripe.js to confirm the payment in the browser.

status string optional

Initial intent status, e.g. requires_payment_method.

amountCents integer optional

Amount in cents.

applicationFeeCents integer optional

Platform fee for this payment.

stripePaymentIntentId string optional

Underlying PaymentIntent id (pi_…).

connectedAccountId string optional

Merchant connected account (acct_…). Initialize Stripe.js with { stripeAccount }.

publishableKey string optional

Public key (pk_…) for the browser SDK.

Errors

  • 400 Missing header — The Idempotency-Key header is required on this endpoint.
  • 400 Invalid request — Amount must be at least 50 cents.
  • 409 Idempotency conflict — This Idempotency-Key was already used with a different request body.
  • 401 Unauthorized — Missing or invalid API key.
Request
curl https://payments.leffelconsulting.com/v1/payments/intents \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
  -H "Idempotency-Key: order-10432" \
  -H "Content-Type: application/json" \
  -d '{
    "amountCents": 4999,
    "currency": "usd",
    "orderRef": "10432"
  }'
Response
{
  "lcPaymentId": "lcpay_9f2c4b1e8a7d4c0fb1e2a3d4c5b6a7f8",
  "clientSecret": "pi_3AbC..._secret_xyz",
  "status": "requires_payment_method",
  "amountCents": 4999,
  "applicationFeeCents": 170,
  "stripePaymentIntentId": "pi_3AbC...",
  "connectedAccountId": "acct_1Nvo...",
  "publishableKey": "pk_live_..."
}
Try it — the interactive sandbox console is coming soon.

Capture a payment

POST /v1/payments/{id}/capture

Captures a previously authorized manual-capture payment. Omit amountCents to capture the full authorized amount, or pass a smaller amount for a partial capture (the remainder is released). {id} is the lcPaymentId.

Auth: X-Api-Key

Request body

amountCents integer optional

Optional. Amount to capture in cents. Omit for a full capture.

Returns

lcPaymentId string optional

Stable Leffel Consulting payment id (lcpay_…). Store this as your reference.

status string optional

Current ledger status (e.g. succeeded, processing, requires_capture, refunded).

amountCents integer optional

Charge amount in the smallest currency unit.

applicationFeeCents integer optional

The platform fee applied to this payment.

currency string optional

ISO currency code (e.g. usd).

orderRef string | null optional

Your order reference, if provided at creation.

stripePaymentIntentId string optional

Underlying processor PaymentIntent id (pi_…).

Errors

  • 404 Not found — Unknown payment.
Request
curl https://payments.leffelconsulting.com/v1/payments/lcpay_9f2c.../capture \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{ "amountCents": 4999 }'
Response
{
  "lcPaymentId": "lcpay_9f2c4b1e8a7d4c0fb1e2a3d4c5b6a7f8",
  "status": "succeeded",
  "amountCents": 4999,
  "applicationFeeCents": 170,
  "currency": "usd",
  "orderRef": "10432",
  "stripePaymentIntentId": "pi_3AbC..."
}
Try it — the interactive sandbox console is coming soon.

Refund a payment

POST /v1/payments/{id}/refund

Refunds a payment in full or in part. By default the platform fee is refunded proportionally. {id} is the lcPaymentId.

Auth: X-Api-Key

Request body

amountCents integer optional

Optional. Amount to refund in cents. Omit for a full refund.

reason string optional

Optional. One of requested_by_customer, duplicate, fraudulent.

refundApplicationFee boolean optional

Whether to refund the platform fee proportionally. Defaults to true.

Returns

lcPaymentId string optional

Stable Leffel Consulting payment id (lcpay_…). Store this as your reference.

status string optional

Current ledger status (e.g. succeeded, processing, requires_capture, refunded).

amountCents integer optional

Charge amount in the smallest currency unit.

applicationFeeCents integer optional

The platform fee applied to this payment.

currency string optional

ISO currency code (e.g. usd).

orderRef string | null optional

Your order reference, if provided at creation.

stripePaymentIntentId string optional

Underlying processor PaymentIntent id (pi_…).

Errors

  • 404 Not found — Unknown payment.
Request
curl https://payments.leffelconsulting.com/v1/payments/lcpay_9f2c.../refund \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{ "amountCents": 2000, "reason": "requested_by_customer" }'
Response
{
  "lcPaymentId": "lcpay_9f2c4b1e8a7d4c0fb1e2a3d4c5b6a7f8",
  "status": "partially_refunded",
  "amountCents": 4999,
  "applicationFeeCents": 170,
  "currency": "usd",
  "orderRef": "10432",
  "stripePaymentIntentId": "pi_3AbC..."
}
Try it — the interactive sandbox console is coming soon.

Retrieve a payment

GET /v1/payments/{id}

Returns the current ledger status for an lcPaymentId. Use this (or the webhook callback) as the source of truth before fulfilling an order.

Auth: X-Api-Key

Returns

lcPaymentId string optional

Stable Leffel Consulting payment id (lcpay_…). Store this as your reference.

status string optional

Current ledger status (e.g. succeeded, processing, requires_capture, refunded).

amountCents integer optional

Charge amount in the smallest currency unit.

applicationFeeCents integer optional

The platform fee applied to this payment.

currency string optional

ISO currency code (e.g. usd).

orderRef string | null optional

Your order reference, if provided at creation.

stripePaymentIntentId string optional

Underlying processor PaymentIntent id (pi_…).

Errors

  • 404 Not found — Unknown payment.
Request
curl https://payments.leffelconsulting.com/v1/payments/lcpay_9f2c... \
  -H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX"
Response
{
  "lcPaymentId": "lcpay_9f2c4b1e8a7d4c0fb1e2a3d4c5b6a7f8",
  "status": "succeeded",
  "amountCents": 4999,
  "applicationFeeCents": 170,
  "currency": "usd",
  "orderRef": "10432",
  "stripePaymentIntentId": "pi_3AbC..."
}
Try it — the interactive sandbox console is coming soon.