Flutterwave / React-Native

React Native library for Flutterwave for Business (F4B) v2 and v3 APIs.
https://developer.flutterwave.com/
MIT License
7 stars 14 forks source link

I am having issues requesting a payment link. #47

Closed 16isaac89 closed 2 years ago

16isaac89 commented 2 years ago

Below is how i implemented the code using axios axios.post('https://api.flutterwave.com/v3/payments', { headers: { Authorization: "Bearer FLWSECK_TEST-" }, json: { tx_ref: "hooli-tx-1920bbtytty", amount: "100", currency: "NGN", redirect_url: "https://webhook.site/9d0b00ba-9a69-44fa-a43d-a82c33c36fdc", meta: { consumer_id: 23, consumer_mac: "92a3-912ba-1192a" }, customer: { email: "user@gmail.com", phonenumber: "080****4528", name: "Yemi Desola" }, customizations: { title: "Pied Piper Payments", logo: "http://www.piedpiper.com/app/themes/joystick-v27/images/logo.png" } } }) .then(response => { console.log(response) }) .catch(function(error) { alert(error.message) console.log(error.response)

    });

But i get a 401 authorization error, i checked the secret key and its correct

corneliusyaovi commented 2 years ago

Hello @16isaac89 👋🏾,

Thank you for sharing your experience with the team.

We are closing this issue out because it is not related to the react-native package. Kindly send us an email at developers@fluuterwavego.com or share on our forum.

We would be on the lookout for your email/message.