Retry Payment With New Card
POST/api/account/retry-payment
Try a new card against a failed-to-charge subscription. Used by the block-screen "Add new card" action.
Flow:
- Resolve the sub + integration (NOT the default integration — must use the integration this sub was created on, otherwise the payment_method belongs to a different Stripe customer).
- Attach the payment_method to the Stripe customer.
- Set it as the sub's default_payment_method.
- Pay the latest open invoice. If success, the standard
invoice.payment_succeededwebhook clears the failed_to_charge state across the board. If failure, append the attempt tocard_attemptsand return the error so the modal can render it without a page reload.
Request
Responses
- 200
- 422
Successful Response
Validation Error