latestOpenAPI 3.1.02026-08-218667571.2 MB

a8ca30023371

User APIs
stripe-invoices
stripe-invoices

Create Invoice

Create a Stripe invoice for token purchase

This endpoint implements the complete invoice flow:

  1. Creates Stripe Invoice (open) with line item amount
  2. Metadata: client_id, user_id, token_amount
  3. Create local Payment record (status=PENDING, link to Invoice id)
  4. Optionally emails hosted invoice URL to customer's billing email

The token granting happens automatically via webhook when the invoice is paid.

post/api/v1/stripe-invoices/create

Request body

token_idstring required

ID of the token to purchase

token_amountnumber required

Amount of tokens to purchase

amount_centsinteger required

Invoice amount in cents

descriptionstring

Invoice description

send_emailboolean

Whether to email the hosted invoice URL to the customer's billing email

Response

Successful Response

invoice_idstring nullable
stripe_invoice_idstring required
payment_idstring required
hosted_invoice_urlstring required
statusstring required
token_amountnumber required
amount_centsinteger required
collection_methodstring required
email_sentboolean
email_statusstring
email_errorstring