Hello, I need some help if anyone has java-script knowledge.
I found this tutorial online
https://www.dudelemon.com/wix-code-stripe-recurring-tutorial
With this code you create a new customer, create card token and subscribe to a plan.
But I have tried many times, it’s not working 100%
The customer is created and then the card token is created aswell and when it tries to subscribe to the plan I get an error saying that this customer doesn’t have saved payment card. I can see that the card token is created, so I guess it’s just not saving it to the customer.
Since stripe API is written for the stripe js https://js.stripe.com/v3 and I can’t use it (call it) in wix-code, I tried to copy the stripe js and paste it to a new backend file, but it gives many errors.
I wanna do the following actions:
- Save card to a customer
- Retrieve (last 4 digits and exp date) and Update card with new info
- Activate subscription with Start date to choose when it will start
- Delete subscription
does anyone can help me please?
Thank you