Closed jasgan closed 7 years ago
That error means that stripe doesn't know about the user's payment information yet. You need to make a call to
http://api.instacrate.co/stripe/customer/create/{token_id}
while logged in as the user who is subscribing.
The stripe token is only created after a customer enters their credit card information and checks out. So when they checkout for the first time ever, I need to run http://api.instacrate.co/stripe/customer/create/{token_id}
right before I run http://api.instacrate.me/stripe/customer/sources/{$token}
correct?
But how would I know if the customer is a "first-time customer"?
Fixed this, so you'll only ever have to run customer/sources/{$token}
I created a new user and the user subscribed to boxes for the first-time. This was the error:
{"error":true,"message":"User must have stripe id to subscribe to box."}
How could we fix this problem?