Setup your data as follows:
Call that API key in your backend workflow (current user’s api_key).
Use the success response from Stripe to DO SOMETHING after the message (if failed, take user back somewhere, if success, change the users role) type of thing.
You’ll want to start from the very basic stuff, to the more advanced stuff to precisely nail down what you’re trying to do. There are a lot of different types of logic you need to setup for this type of system.
This is a good site as an example. Doesn’t explain data, but it kind of shows the operation.