Search client transactions data - paypal

I'm building an application that resembles personal financing. For that, I need to fetch information about that customer's transactions.
I managed to run the GetBasicPersonalData example within the permissions service.
Here it says that requesting TRANSACTION_SEARCH will allow me to use TransactionSearch on behalf of the customer.
There is no such endpoint and calling the NVP service with METHOD=TransactionSearch and similarly constructed X-PAYPAL-AUTHORIZATION header doesn't do it either.
How can I use the token and token secret retrieved from the permissions service to list that customer's transactions?
Update: According to FAQ#6 here, the X-PAYPAL-AUTHORIZATION is supposed to be used to replace the USER, PWD, and SIGNATURE params. When I call the nvp service that way I get:
TIMESTAMP=2016%2d11%2d07T15%3a35%3a36Z&CORRELATIONID=f50b7296c2d28&ACK=Failure&VERSION=94%2e0&BUILD=24616352&L_ERRORCODE0=10002&L_SHORTMESSAGE0=Authentication%2fAuthorization%20Failed&L_LONGMESSAGE0=You%20do%20not%20have%20permissions%20to%20make%20this%20API%20call&L_SEVERITYCODE0=Error

I'd like to share below useful documents for your reference:
TransactionSearch API guide here;
TransactionSearch API reference here;
PayPal API Endpoint here(Refere Merchant APIs);

Related

Get All Refunds in BigCommerce

I'm using BigCommerce and want to know if there is an endpoint that retrieves all refunds. I've seen the v3 orders endpoint /orders/{order_id}/payment_actions/refunds, but this gets all refunds for a specific order.
I want to know if its possible to get all refunds of all orders.
Edit:
Found the path for refunds, but now I need to know if I can use query params to filter the data or not.
In the orders API we can use filters like min_date_modified. Can I use the same for the refunds endpoint?
It seems they've missed the documentation on that endpoint, but if I was to guess I'd try /v3/orders/payment_actions/refunds?created:min=2021-01-01T23:05:05%2B00:00 since that's how other V3 endpoints work. I used that query and it didn't error (once I encoded the + sign in the time), but I don't have production creds at hand to test with real refunds.
I found an article that specified the endpoint URL
https://medium.com/bigcommerce-developer-blog/order-refund-api-automate-refunds-in-bigcommerce-7a00aaa6fae7
the endpoint to get all refunds is orders/payment_actions/refunds

Replacing PayPal SetExpressCheckout SOAP API with REST API V2

We are in the process of replacing our Paypal SOAP API calls (SetExpressCheckout etc.) with the Paypal REST API V2.
Three questions:
1) Paypal has two similar APIs: orders and payments. Which one is considered to be the replacement for SetExpressCheckout?
2) We use the tokens returned by SetExpressCheckout to do a capture or refund later. Can the tokens we got from SetExpressCheckout also be used to do a capture / refund using the REST APIs? (If not, we cannot do a "big-bang" migration, but keep both implementations in place until we are sure no capture or refund will take place for transactions which have been issued with the SOAP API).
3) Does the merchant need to amend anything in his profile, e.g. give new rights to use the REST API? For example, we use SOAP API call TransactionSearch, which requires special rights - are those also valid for REST API calls?
1) Creating a v2/order replaces SetExpressCheckout. Capturing a v2/order replaces DoExpressCheckoutPayment. The capture will return a new transaction id that is a v2/payment object, and this v2/payment object id is the only thing that is preserved in www.paypal.com for accounting purposes (the v2/order id is not used for accounting; like an EC token, it is for the payment approval process only)
For the front-end, use
https://developer.paypal.com/demo/checkout/#/pattern/server
[ You mentioned capturing later, so the following won't apply to that particular case, but: if your flow were set up to capture right after approval with the buyer present, then -- once everything about your implementation is working for the happy path -- don't neglect to add support for handling funding source failures, so that if the immediate capture fails due to e.g. the buyer's first card being declined, this is propagated back to the UI and the buyer can select a different funding source right away ]
2) SetEC tokens cannot be mixed with REST APIs for capture
3) Yes and no. If you're using a REST API to search transactions, then what will matter are the permissions of the REST ClientID+Secret you are using. What will be most straightforward will be for the merchant to generate a new REST app in https://www.paypal.com/signin?intent=developer&returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications with all the necessary permissions, and provide you with that REST App's live ClientID+Secret.

Can matchCriteria NONE in GetVerifiedStatus API call?

As per Paypal Doc's matchCriteria can be NONE only for for certain financial institutions, what does it mean ?
With sending firstName & lastName empty values and matchCriteria as NONE in sandbox environment I'm getting expected response from API call, will this also work in live environment too ? I want to know this before moving my code to production and I didn't found clear information regarding this on doc's.
You will have to create a business application requesting this service to PayPal so they can grant you access. PayPal reviews the different services you are requesting and grants an APP-ID that can be used for API calls. matchCriteria=NONE is an advanced permission.
https://developer.paypal.com/docs/classic/lifecycle/goingLive/

PayPal REST API - Get Sale by Transaction ID - The requested resource ID was not found (404)

I am essentially trying to get the details of any transaction ID in my PayPal account to authenticate users I am migrating to a new authentication system.
I am using the PayPal Rest API so: http://puu.sh/gdb3T/461dde2928.png and yes I have checked everything is fine, it is infact set to live with the correct id / secret.
This isn't exactly an answer to this specific question, but I have simply fixed it by using PayPal's classic API in order to get the job done.
Kind of strange the rest API doesn't let me do this.

How to pre-fill customer details using Paypal REST API?

We're using Paypal's REST API and we'd like to pre-fill the customer's data (email, name, address) on the approval's page.
There is a payer_info object that can passed to Paypal when the payment is created. But it does not allow specifying customer's details - email field is not supported and others are read-only. Also I don't see any mentions in the API docs on how to achieve this with the REST API. Do you know if it's possible and how? If it's not supported, is it known when it's gonna be supported?
Thanks in advance.
Even when using PayPal REST API you can follow these instructions https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_prepopulate_outside and append the params as GET params on the end of the aproval_url before redirect the customer.
For example:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-77D44712W7736393M&first_name=Geovanny&last_name=Junio