ok, found it! it is Permanent Authentication Token...
# prisma-whats-new
s
n
@sunrising indeed! remember, the guide was created with mutation callbacks in mind that are about to be deprecated in favor of SSS πŸ™‚ So you would better use SSS instead
πŸ‘πŸ½ 1
d
@sunrising, soon I'll be following that stripe tutorial as well. Did you have many issues implementing
Serve-side-subscriptions
as opposed to the deprecated
Mutation-callbacks
for which the tutorial was originally written?
m
@nilan, will be updating this tutorial with SSS soon… @dk0r perhaps this can also help. https://medium.com/consciousapps/integrating-stripe-with-react-graphql-and-apollo-client-e09fdc9e5b95
😍 1
n
that's amazing!
d
thanks @martin --looking it over now and followed you on medium
πŸ‘πŸ½ 1
n
@martin, here's a quick example for a SSS that creates a new customer on Stripe: https://github.com/graphcool-examples/functions/tree/master/stripe-create-customer
πŸ‘πŸ½ 1
m
Awesome, @nilan!
πŸ™Œ 1
s
@nilan @martin thank you, i am now following the new material, and will give you feedback later!
❀️ 2
ok guyz, i'm almost done i think... @martin your article on medium is really well written but i'm afraid that the process now, with SSS is too much different @nilan thanks to your code I understood what I had to do to change the flow for the payement why i needed a different flow when a user registers for the first time to a service it's very likely that he dont want to give his credit card data because he still needs to try the product, so the I prefere the flow like in the first graphcool tutorial:
registration
->
add card details
->
create user on stripe
->
charge the user
πŸ‘πŸ½ 1
after the customer creation on stripe i need to update the User node mutating the
stripeCustomerId
but it says that the permissions are not right.. how can i modify permissions so that code from SSS is capable of modify a node?
n
you can use a PAT as
Authorization
header πŸ™‚
s
UH! RIGHT! that's what is there for!!
πŸ™Œ 1
aaaaaaaaand it's working great! pokemon wartortle
m
Yeah, the article needs to be updated. Thanks, @sunrising.
πŸ‘ 1
d
hmm, so mutations are deprecated and replaced by SSS --guess I won't bother reading about mutations then
n
mutations are not being deprecated!
mutation callbacks are
d
ty
s
when do you think it's the most appropriate moment to check a subscription state with a SSS? when the user logs in?
n
I'm not sure I understand your question here, could you try to rephrase it? πŸ™‚
s
i need to setup a subscription (recurring) payement with stripe
how can i check if the user is paying or if he didn't pay the last month?
I'm sorry I'm completely missing the user subscription architecture.. actually I think I am trying to reinventing the wheel... maybe you know some documentation I can relate to?
maybe
webhooks
is the answer
n
ah, sorry got confused because
subscription
can have so many meanings πŸ˜„
you were talking about Stripe subscriptions
Both the official guide and @martin's guide don't cover Stripe subscriptions but rather Stripe one time charges
s
d
@sunrising I assume that ^ covers recurring billing?
What are you using for authentication? Auth0 or stormpath/okta?
s
yes @dk0r but that part is really more about how you set up your plans i think
auth0
mmmm i could check on their website too πŸ€”
d
So in short, what did you learn from your link that official/martin's did not teach you?
s
still nothing... I set up the stripe customer creation and the card creation with sss...
then i almost finished stripe charge when i found out that probably subscriptions fits best for me
anyway nilan's example works just fine, if you need to tune it a little i will try to help you but i won't be much responsive until tomorrow, i'm sorry
πŸ‘ 1