Getting Paypal API response - api

I am trying out the PayPal API Developer Account, and am in the midst of creating a test payment. I have followed the steps stated here.
However, what I want to do is to extract the JSON response from the orders API, in which I would be using in Tibco. The request has been successfully made and is reflected in the Sandbox account. But I am unsure how I can obtain the URL that returns the JSON response from the orders API.
I am new to Paypal API integration and I would really appreciate any help provided.

Related

Is there a way to request Stripe for the cancellation reason of a subscription via API?

I am trying to query stripe for the cancellation reason of a subscription to feed this information into our CRM system.
The information I am looking for can be found in the dashboard here:
Stripe dashboard image
I found out that the browser sends a request to https://dashboard.stripe.com/v1/subscriptions/sub_xxx but with an API key that seems to belong to user request: uk_xxx. When I send a GET request to that endpoint with my API key sk_live_xxx I dont get the same data, i.e. the following information is missing:
{
"customer_portal_data": {
"cancellation_reason": "too_expensive",
"cancellation_reason_text": null
}
}
My question now: is there a way to query this information via the standard API from stripe?
This feature is only available in the Dashboard and Sigma right now and is not available via the API.

Detect an invalid paypal email using MassPay Paypal API

I'm using MassPay Paypal API to make payments.
I was able to test it and is working pretty well using sandbox accounts.
The problem is I couldn't find a way to identify if the email that is going to receive money is a valid paypal email.
I tested it using a fake email and money was taken from the payer sandbox account even though the email (the one that should receive the money) doesn't have a paypal account associated, and the API response was as if it was a successful request.
I found this method to get the verification status of an account, but there is no much info in the documentation or any other info that helps me understand if this is what I'm looking for or how to apply it.
You will need an API operation called GetVerifiedStatus API Operation under PayPal adaptive accounts. Refer the below:
https://developer.paypal.com/docs/classic/api/adaptive-accounts/GetVerifiedStatus_API_Operation/
https://developer.paypal.com/docs/classic/adaptive-accounts/gs_AdaptiveAccounts/
Sample API request:
API end point: https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus
requestEnvelope.errorLanguage = en_US&emailAddress = email#test.com&firstName = Firstname&lastName = Lastname&matchCriteria = NAME

How to get payout using PayPal API, with only batch_sender_id

Sometimes the PayPal API fails to give back a payout_id but still processes a payment (i.e. because the server is down).
I have some payments that I would like to fetch information for, but only have the batch_sender_id (the id that I gave each payment).
Is there a way to get the payment information with PayPal's API? There doesn't seem to be a way to fetch payments without the payout_id.
Resubmit with the same batch_sender_id, it should return html code 400 with a link to the resource that contains the previously submitted request. So before making a request to PayPal be sure to store the batch_sender_id so you can re-request later if you do not get a response.

How do I add a PayPal API request call?

We are using Woocommerce along with PayPal Pro on our website.
We are using the CloudIQ basket abandonment system and need to add a PayPal API request call to be made after the customer completes the checkout process.
Does anybody know if this is possible in PayPal and how I do this?
Thanks
Not quite sure about your exact request. But if you are referring to the data collection API call in PayPal, you can refer to the link below about PayPal Instant Payment Notification (IPN).
https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/
In addition, PayPal have Classic API and REST API for your reference in the link below.
https://developer.paypal.com/docs/classic/api/
https://developer.paypal.com/docs/api/

Paypal Payments (Authorization & Capture) not returning Authorization ID

According to the documentation the paypal payment method should be able to do Authorization & Capture just fine. The following excerpt under the PayPal authorizations excerpt specifically states how to go about it:
First get payment approval and execute the payment as you normally would do for a PayPal payment. Once you successfully execute on the payment authorization, PayPal responds with a new set of HATEOAS links, including a capture link that you use to capture the payment.
So if im following correctly the flow for doing Authorize & Capture is as follows:
Create a Payment
Redirect User to HATEOAS link approval_url to get them to sign into paypal.
Be returned to success (or cancel, but not in this example) link.
Get the Payment to see what's changed, get the shipping address / etc....
Let the customer review the details
Execute The Payment to commit to the hold on funds.
At this point an AuthorizationID / HATEOAS Link should hold information about the authorization.
Some time later use the authorization ID to Capture, and voila, we're done.
Now this is all fine and dandy, but in my tests on the sandbox environment I'm having trouble retrieving the authorization ID anywhere.
Here's my HATEOAS Links I receive from my Execute Step:
As you can see, only the self reference is returned, according to the documentation there should be one capture link at the least that should have the authorizationID in it.
Also, nowhere in the response body is any authorization ID. However, If I look at the payment in my sandbox paypal dashboard:
And once I drill down into it:
Sure enough if I call the Authorization.Capture API call against 8B633793L37511009 it captures as you would expect. However I can't find a programmatic way to determine this number.
How am I supposed to store the authorization number so my tooling can capture later when our business conditions have been met?
In the beggining, when you create the payment with intent authorize you should be getting an authorization object within the response. This object has the id you need for the capture later.
Check this blog post to see if you're missing something fundamental in the picture.
I followed the tutorial and executed the sample requests via curl. As you can see, I got the authorization id under transactions->related resources->authorization->id
Then I used the id in the URL and successfully captured the payment.
Hope this helps, if it doesn't, please elaborate and maybe I will be able to help you further. Good luck!