I am new to the PayPal APIs. I want to integrate the paypal transaction functionality into my project. I now understand the basic API flows:
- Created an order by calling "Create Prder" API
- wait for the payer to pay
- Authorize payment for order (optional if the order was created as capture for intent)
- capture the payment
Now I am able to complete the entire payment with pure REST apis for test environment. However, I noticed there is an api called "confirm the order". what role does this api play, and where and when do I insert this call to the flow?
I’ve tried call this API after I created an order, however, I received the 415 code. I followed the paypal documentation, but that doc is kind of obscure to me.
2
Answers
To be specific about what you are talking about, the confirm API call is documented here https://developer.paypal.com/docs/api/orders/v2/#orders_confirm
It is not called manually by any integration you are using, therefore you can ignore it.
In the case of an Advanced integration, it is called automatically directly by the card fields JS when its fields are submitted (after successful submission, then the capture order occurs)
Other local/alternative payment methods supported by PayPal might possibly make use of this API as well, but if nothing in their steps says to call the API yourself then do not.
Did you solve it?
I am implementing Paypal by API Rest and my steps are as follows:
I have not been able to get it to work