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

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

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

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/

Search client transactions data

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);

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.

Bigcommerce API Authenticating a customer with GET request

I'm doing a GET for customers with a given email address (there will only be one). Before displaying the returned information, I need to authenticate the user, but I can't see a way in the docs that allows providing a password as a parameter to a GET. In fact It only seems to be possible to provide a password when creating (POSTing) or updating (PUTting) a customer. Is it possible to authenticate customers via the API this way?
from what I understand - _authentication is only supported for POST and PUT on customer objects. I believe it is intended to create a customer who can login and stuff like that.
Can you explain your use case and maybe there is a workaround..