Reputation: 41
I am trying to integrate PayPal express check out on our site using the REST API with the following workflow steps.
To match the above step, here are my understanding based on the api https://developer.paypal.com/docs/api/
My question are:
Is this the correct workflow for express checkout? It’s a little more complicate than regular payment since we have to calculate shipping/tax on our end.
Will paypal pass us the billing address from above api call? I didn’t see billing address in the response object. If not how do we get it?
Please note these questions are related to REST api not classic express checkout. Thanks in advance.
Upvotes: 2
Views: 787
Reputation: 3402
A little rectification and re-summarize the flow:
authorize
”, send amount total: $10
(identify "payment_method": "paypal"
in the payer
object)approval_url
and use that to redirect customer to PayPal checkout pageexecute
api with HATEOAS link (execute link) from Step#2 and "payer_id"
obtained from the return url, PayPal responds with a new set of HATEOAS links, including a capture link that you use to capture the payment.
Also, you will be able to obtain the shipping_address
from the payer_info
object of the Json response is_final_capture=true
is an api request parameter, not a confirmation from PayPal, it indicates that this is a full capture rather than a partial capture. What PayPal would confirm is "state": "completed"
in the json response
You will not be able to get the billing address of the buyer, the feature has to be reviewed and with special access granted on your account, you may turn to PayPal service for further details
Upvotes: 1