v44

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-20129390589.6 KB
admin

⚠️ This endpoint is in public preview.

post/preview/v2/admin/invoices/{account_id}/create

Path parameters

account_idstring required

The account identifier to create an invoice for

Request body

credit_amount_centsinteger required
customer_emailstring nullable

Required for rail=stripe; Mercury resolves the email from Clerk.

memostring nullable
days_until_dueinteger nullable
rail'stripe' | 'mercury'
payment_method_typestring nullable

Required for rail=stripe. Accepted values: card, ach.

idempotency_keystring nullable

Required for both rails.

Response

Invoice created and sent

object'invoice' required
rail'stripe' | 'mercury' required
stripe_invoice_idstring nullable

Set for rail=stripe.

mercury_invoice_idstring nullable

Set for rail=mercury.

invoice_idstring nullable

Local invoices.id. Set for rail=mercury.

hosted_invoice_urlstring nullable
credit_amount_centsinteger required
platform_fee_centsinteger required
actual_fee_centsinteger required
adjustment_centsinteger required
subtotal_centsinteger required
total_centsinteger required
payment_method_typestring required

Example response

{
  "object": "invoice"
}