Question

We are trying to build the generic android mobile app which can be used by magento 2 owners using REST API for Magento2 and have implemented the basic features for the app.

As most of the people uses paypal for the payment gateway, we planned to use the paypal Android SDK for our mobile app but the problem is that we are not able to find the REST API to submit the transactionId or PaymentId to magento2.

Do we need to write our own API for this or is there any existing rest API which we can use and submit the transactionId to magento2 store?

Please help us.

Was it helpful?

Solution

There is no payment API specific to paypal, you can set the payment using the the generic payment API and pass the neccessary parameters in it.

You'll need to set the payment using (POST) /V1/carts/mine/set-payment-information and (POST) /V1/carts/mine/payment-information endpoint and retrieve it using (GET) /V1/carts/mine/payment-information.

Check out Magento Swagger for more information - https://devdocs.magento.com/swagger/

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top