How to charge a user after a set time if they don’t return item – APIs


Hi, I am creating an app that checks things in and out. For this example I will use a library.

If the users do not return their books after three weeks, we are going to charge them the cost of the book (in this case, one set price for now).

I have the timer set as a Return Deadline (date) under the Book data type that starts when the book is checked out. The timer is set to blank when the book is returned. However, if the book is not returned, I need to trigger a charge once the timer runs out.

I think this will likely be a backend API workflow, and it needs to connect to Stripe. Do I need to first create a book “product” in Stripe? How do I call the date within the API database?

Thanks so much for your help!



Source link

Leave a Comment