Automate In-App purchases using backend APIs

I am interested in using sandbox users for my automation, and I want to bypass the UI and execute the automation using the APIs. I have found the APIs to list users, modify users, and clear purchase history, but I am not sure if there is a way to create and delete users programmatically. https://developer.apple.com/documentation/appstoreconnectapi/sandbox_testers

Currently, our app calls Apple to get the payment receipt, and then our internal workflows are triggered based on the response received from Apple. Is there a way to bypass UI and achieve the same thing using the backend APIs for sandbox user accounts?

I also need some clarification on how to generate the JWT token for authorization purposes. Do I need to regenerate the JWT token every 30 days?

Thank you for your time and consideration.

I am not sure if there is a way to create and delete users programmatically

The page that you linked to says:

you cannot add or delete them directly. Go to App Store Connect to create a new sandbox tester Apple ID.

Do I need to regenerate the JWT token every 30 days?

No. Much more frequently. I think the max validity in mist cases is 20 minutes. This is described in the documentation.

Automate In-App purchases using backend APIs
 
 
Q