Retry payment

POST https://app.speybooks.com/api/v1/admin/orgs/{id}/retry-payment

Retry a failed Stripe invoice payment. If invoiceId is provided, retries that specific invoice. Otherwise, fetches the most recent open invoice for the customer.

Calls stripe.invoices.pay() to attempt collection.

Request Body

  • invoiceId — optional Stripe invoice ID. If omitted, uses the latest open invoice

Error responses:

  • 400 { code: "NO_CUSTOMER" } — no Stripe customer
  • 400 { code: "NO_OPEN_INVOICE" } — no open invoice to retry
  • 404 { code: "NOT_FOUND" } — organisation not found

Path parameters

id string required
Organisation ID.

Body parameters

invoiceId string optional
Stripe invoice ID to retry. Omit to retry the latest past_due invoice.

Response

200 Payment retried. Returns invoice status and amount paid.
Show response fields
amountPaid integer
invoiceId string
paid boolean
status string

Error codes

400 No Stripe customer or no open invoice.
404 Organisation not found.