Retry payment
POST
https://app.speybooks.com/api/v1/admin/orgs/{id}/retry-paymentRetry 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 customer400 { code: "NO_OPEN_INVOICE" }— no open invoice to retry404 { code: "NOT_FOUND" }— organisation not found
Path parameters
id string requiredOrganisation ID.
Body parameters
invoiceId string optionalStripe 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 integerinvoiceId stringpaid booleanstatus stringError codes
400 No Stripe customer or no open invoice.
404 Organisation not found.