Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Rohail12's avatar

I can't create stripe token using createTokenWithCard() in React Native

I can integrate Stripe payment method in React Native app. I can use tipsi-stripe package and use createTokenwithCard() method to generate token from server but return null promise.

I am trying different thing but stripe return null promise and i am not understanding why stripe return null promise.

stripe.setOptions({ publishableKey: '*****************', androidPayMode: 'test', })

onVerifyHandler = () =>{

const token = stripe.createTokenWithCard({ number: '4242424242424242', expMonth: 11, expYear: 17, cvc: '223'}); console.log(token); }

Output:Null Promise

Promise {_40: 0, _65: 0, _55: null, _72: null}
0 likes
0 replies

Please or to participate in this conversation.