Invoice Payments API
Connect Stripe for a team, check connection status, and create a payment intent for a customer invoice.
Public API v1 has Stripe Connect setup and invoice payment-intent operations under /invoice-payments. It does not have a general /payments collection.
Endpoints
| Method | Endpoint | Access | Purpose |
|---|---|---|---|
| GET | /invoice-payments/connect-stripe | invoices.write | Generate a Stripe Connect authorization URL |
| GET | /invoice-payments/connect-stripe/callback | Provider callback | Complete Stripe authorization |
| POST | /invoice-payments/disconnect-stripe | invoices.write | Deauthorize and clear the team's Stripe connection |
| GET | /invoice-payments/stripe-status | invoices.read | Read connection state and Stripe account ID |
| POST | /invoice-payments/payment-intent | Invoice token | Create a PaymentIntent for a customer invoice |
Connect Stripe
- Call GET /invoice-payments/connect-stripe with an invoices.write bearer token.
- Send the user to the returned url.
- Let Stripe return to the documented callback with its authorization code and state.
- Call GET /invoice-payments/stripe-status with invoices.read.
- Confirm connected, status, and stripeAccountId before you turn on online payment.
The callback is for Stripe, not a general client operation. Preserve its state value. Do not try to manufacture callback parameters.
Disconnect Stripe
POST /invoice-payments/disconnect-stripe tries provider deauthorization. Then it clears the saved Stripe account fields. If provider deauthorization fails because the account is already disconnected, Eigenn still clears the local fields.
Treat disconnect as a write. Supply an Idempotency-Key when your client can retry after an unknown network outcome.
Create a Payment Intent
POST /invoice-payments/payment-intent is a public customer-payment operation. It authenticates with the invoice token for the customer, not a team bearer token.
curl --request POST \
--url https://api.eigenn.io/v1/invoice-payments/payment-intent \
--header "Content-Type: application/json" \
--data '{
"token": "invoice-token-from-the-customer-facing-link"
}'A successful response contains:
- amount
- currency
- clientSecret
- stripeAccountId
Use the client secret only in the intended Stripe payment flow. Do not log it or treat it as an Eigenn API credential.
Payment Status
Invoice-level payment status is also available from GET /invoices/payment-status with invoices.read. See Invoices API for pagination and invoice lifecycle operations.
Legacy Endpoint Boundary
Public v1 does not document:
- GET /payments
- GET /invoice-payments
POST /invoices/{id}/payment-intent
Use the exact endpoints above. Check request models in the OpenAPI explorer.