Is the token unique to the user? And should I store transaction history locally?
Is the token unique to the user, or to the transaction?
i.e. If I add a free 7 days to a users account and I get the new details about that user will the token have changed?
Therefore, should I store that token in my database for use, or just get it every time they want to go to Spreedly to change their details?
And if I'm storing that token locally, is it best practice to store all the data that Spreedly sends me in a database, to keep a history of all transactions? Or am I safe to assume that I can go and get this data from Spreedly every time it is required?
i.e. If I add a free 7 days to a users account and I get the new details about that user will the token have changed?
Therefore, should I store that token in my database for use, or just get it every time they want to go to Spreedly to change their details?
And if I'm storing that token locally, is it best practice to store all the data that Spreedly sends me in a database, to keep a history of all transactions? Or am I safe to assume that I can go and get this data from Spreedly every time it is required?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Tokens are unique to a subscriber, so you can store them long-term - no need to get them every time.
One of our goals with Spreedly is to make it so you don't have to keep track of billing information, so no need to store all the data. Just cache the bits you need regularly, and you can pull everything else out whenever you want via the API.
I’m confident
1 person says
this answers the question
-
Inappropriate?thanks, that pleases me.
I’m loving the fact that you answer my questions so promptly.
-
Inappropriate?What's the minimum data that we need to store? Is it just the subscriber's Spreedly ID?
And are there any other bits that you think would also be wise to store locally (even if they aren't "necessary")?
I’m curious
-
Inappropriate?Technically you don't need to store anything - since the customer_id is assigned by you, you can use a key that you already have, and request any other data you need right when you need it.
Realistically you should think of your local storage as a cache, and store data accordingly. If a piece of data is used on nearly every request in your application, you should almost certainly cache it locally. On the other hand, if you only rarely need a piece of data, you can just pull it down from Spreedly when you need it and not bother caching it locally.
Does that help explain?
Loading Profile...




EMPLOYEE