I am trying to add a stripe subscription to a Mobile App that is developed on Flutter Framework and this Mobile App does not have a backend. I am kind of confused as I have added all the APIs from Stripe like creating a Customer, creating a price, creating a payment method and then creating the subscription.
Now comes the confusion part while creating the payment method from the API it gives me the following error:
{
"error": {
"message": "Sending credit card numbers directly to the Stripe API is generally unsafe. To continue processing use Stripe.js, the Stripe mobile bindings, or Stripe Elements. For more information, see https://dashboard.stripe.com/account/integration/settings. If you are qualified to handle card data directly, see https://support.stripe.com/questions/enabling-access-to-raw-card-data-apis.",
"request_log_url": "https://dashboard.stripe.com/logs/req_775vPrs4OZmBKF?t=1713787864",
"type": "invalid_request_error"
}
}
I know that what the error says is that I cannot send the card numbers directly it is unsafe. So I have read many tutorials that say to create card tokens first then and I have created tokens as well from the APIs but still it gives me the same error and I tried to create the payment method from the code but there is no way that I can pass the card numbers and other stuff through the Flutter and what it says is that only enter the billing details, shipping details and mandate details.
So, I am using flutter_stripe plugin.
So please help me, how can I send the card numbers into the Payment Method to create it and then add PaymentMethodID into the Subscription.
Thanks
3