How to build a self-service widget to allow end-users to request a refund from Stripe via the Help Center?
When an end-user is on our Help Center and submitting a support request via the web form or widget, I'd like the web form to enable end-users to perform specific self-service actions, such as requesting a refund similar to what Doordash built if their order is missing an item. For example:
An end-user would like a refund, and they choose the refund option from one of the ticket fields.
The web form or widget will make an API call to the customer's account in Stripe and pull their most recent payments.
The end-user will select which payment they'd like to refund.
An API call is sent to our backend, where we have a set of conditions that a refund will be processed, such as the amount, if a refund has been requested in the past, and specific account usage information (e.g., the last activity date).
If the API response is "true," then an API call is sent to Stripe to process the refund.
Stripe will send a response with a status o