I am using Stripe with Android I can't find what I a doing wrong to get this error :
Customer cus_xxx does not have a linked source with ID card_yyy com.stripe.exception.InvalidRequestException: Customer cus_xxx does not have a linked source with ID card_yyy.
I have already seen this SO post that deals with a comparable issue but mine is different.
Here is my workflow :
1.On my app I create a card with this code
Stripe stripe = new Stripe(context, PUBLISHABLE_KEY);
// Stripe API call to get paymentSourceId
stripe.createToken(card, new TokenCallback(){...});
This method is an HTTP API request and I get my paymentSourceId = card_yyy
from the response to this webservice.
2.I get ephemeral key with an HTTP API request to my backend, I extract paymentSourceCustomerId = cus_xxx
from ephemeral key
3.Finally I try to create a charge with this parameters
{
"amount":2999,
"currency":"USD",
"paymentSourceCustomerId":"cus_xxx",
"paymentSourceId":"card_yyy"
}
And then I get the error.