#eze-rn-token
1 messages · Page 1 of 1 (latest)
Hey!
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
yes, but no log generated
i try now:
const token = await createToken({
type: 'Card',
number: '4242424242424242',
expMonth: 7,
expYear: 2023,
cvc: '314',
});
like as your example (in Stripe Docs)
And what was the outcome?
LOG {"error": {"code": "Failed", "declineCode": null, "localizedMessage": "Card details not complete", "message": "Card details not complete", "stripeErrorCode": null, "type": null}}
I try this from yesterday without results. I tried adding various parameters like as country, zip, name, card brand, 'Credit'...
Here's the type for the createToken function that reflects the required parameters: https://github.com/stripe/stripe-react-native/blob/94f83e163678902d08eaf6474a7e3f1434875ee6/src/types/Token.ts#L59-L64
You can't just pass raw PAN data like that, you need to use a Elements component like CardField
ok, I will try with createCardTokenParams. But I can't use Element because the layout is different.
or use Element is mandatory?
Do you have the PCI compliance to be handling raw PAN data without Elements?
not, does this mean that we need to have PCI compliance to not use Element?
well not really since I think its' ok as long as the token creation happens on the mobile app the customer is using.
either way, just use one of the CardElements from the SDK for the customer-facing input really. I don't know if the ReactNative library exposes a way to create a token with raw PANs, seems like it doesn't as you've found, since nobody really needs to do that.