Skip to main content

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:

  1. 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).
  2. Attach the payment_method to the Stripe customer.
  3. Set it as the sub's default_payment_method.
  4. Pay the latest open invoice. If success, the standard invoice.payment_succeeded webhook clears the failed_to_charge state across the board. If failure, append the attempt to card_attempts and return the error so the modal can render it without a page reload.

Request

Responses

Successful Response