Pay Multiple Invoices

View as Markdown
Pay multiple invoices with multiple succeeded payment intents. Use case: Batch payment processing for multiple subscriptions created in a single checkout. This endpoint is called by the checkout flow after payment intents are confirmed. Requirements: - All payment_intent_ids must be in SUCCEEDED status - All payment intents must belong to the same customer - All invoices must use the same currency Behavior: - Matches payment intents to invoices (exact amount first, then sorted) - Marks each invoice as PAID using its corresponding processor attempt - Activates subscriptions linked to paid invoices (INCOMPLETE → ACTIVE) - Handles partial failures gracefully (continues processing remaining invoices) Returns detailed outcome for each invoice including: - Invoice status and ID - Subscription status and ID (if applicable) - Processor attempt details - Success/failure status with error messages

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

account_idstringRequired

Request

This endpoint expects an object.
account_idstringRequired
customer_idstringRequired
payment_intent_idslist of stringsRequired
invoice_idslist of strings or nullOptional

Response

Successful Response
outcomeslist of objects
total_processedinteger
total_succeededinteger
total_failedinteger
overall_successboolean

Errors

422
Unprocessable Entity Error