VivaPayments / API

Index of Viva Wallet open source projects on GitHub.
138 stars 163 forks source link

Oauth authentification #2490

Closed mikaelcarlavan closed 5 months ago

mikaelcarlavan commented 5 months ago

Hi guys,

I'm trying to use the API to create payment but I am stuck with the Oauth authenfication. I downloaded the request from Postman, used my Smart Checkout Credentials but it is not working, I always get "invalid_client".

Here is the request : curl -L -X POST 'https://demo-accounts.vivapayments.com/connect/token' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Basic XXX' \ --data-urlencode 'grant_type=client_credentials'

Any ideas ?

VivaWalletCustomerSupport commented 5 months ago

Hello @mikaelcarlavan,

Thank you for your message. You can follow this guide to create an access token. Make sure you used the correct credentials.

After the creation of the access token, the last step is to generate an order code. For the order code creation you will make another API request.

Kind regards, Viva Wallet E-commerce Support Team

mikaelcarlavan commented 5 months ago

Hello,

I followed your guide but it is still not working. I also tried all the possible credentials without success. Seems like severals issues are related to the same problem : for ex #2404 #2159 #1428

mikaelcarlavan commented 5 months ago

Ok, seems like the demo endpoint only works with the sandbox account. Problem solved.