How to get the Business Name via Payments REST API? - paypal

On the GetExpressCheckoutDetails API Operation (NVP), there is a BUSINESS-Tag (Buyer's business name).
How can I get this business name via Payments REST API?

Related

Refund PayPal PAYID using v2 REST API?

I have used the Amelia Booking plugin for my one of the site.
I would like to implement the split payment & refund to customer functionality with PayPal payment gateway.
I made one addon for my site which can split the payment using PayPal payout APIs(https://api-m.sandbox.paypal.com/v1/payments/payouts).
Split is working fine but to make a refund I need customer's PayPal details.
So I did below things:
Amelia is storing the transaction information in the database in below format.
{
"data":
{
"PayerId": "4ABCDEFGHIJKL",
"PaymentId": "PAYID-ABCDEFGHIJKLMNO2PQRSTUVW",
"transactionReference": "PAYID-ABCDEFGHIJKLMNO2PQRSTUVW"
},
"amount": "00.00",
"gateway": "payPal",
"currency": "USD"
}
So from above information I can access "transactionReference" to fetch the customer's details using (https://api-m.sandbox.paypal.com/v1/payments/payment/{transactionReference}) API call to make refund.
But unfortunately this endpoint is deprecated, so is there anyway to fetch the customer's PayPal data using above information from PayPal v2 API ?
The v1 APIs are deprecated for new integrations, but if you are currently using them to process payments -- which if you have a PAYID, you are in fact doing -- then you must use the v1 API for refunds.
Using the v2 API for refunds is only applicable if you are using something like the v2/checkout/orders API to process payments, which that plugin is not doing.

How do I obtain permission to process on behalf of a PayPal merchant using the PayPal REST API?

I would like my website to be able to process PayPal payments on behalf of merchants. The merchants will have their own PayPal accounts and will need to give me permission to do so.
Permissions API Deprecated
PayPal have a "Permissions API" which allows a third-party such as a hosted shopping cart to process on behalf of PayPal merchants. See: https://developer.paypal.com/docs/archive/permissions-service/integration-guide/PermissionsUsing/
The above page says:
Adaptive Accounts and Adaptive Payments are no longer available for
new integrations. PayPal provides documentation for these APIs to
support existing integrations.
PayPal REST API
Are these things possible using the PayPal REST API:
perform a handoff from my site to PayPal, have the merchant grant my site permissions to act on their behalf,
process payments on behalf of the merchant using the credentials obtained from the first step
Every merchant can obtain ClientID/Secret credentials from the Live tab of a REST API App via https://www.paypal.com/signin?intent=developer&returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications , and enter them into their config interface on your platform.
It's is possible to use the PayPal "Marketplaces and Platforms" API to achieve this:
https://developer.paypal.com/docs/platforms/seller-onboarding/

API calls required to obtain buyer's e-mail

I'm using PayPal Express checkout with BigCommerce with a sandbox account. Via the BigCommerce API, only one field is supplied, which is also listed via the http://www.sandbox.paypal.com interface as the "Unique Transaction ID" under "Details":
<payment_provider_id>0P192574JB861364C</payment_provider_id>
The orders are going from BigCommerce into an ERP system that, for PayPal Express orders, expects the PayPal username (e-mail) to be provided.
Via the PayPal REST API (or otherwise), is there a way derive the e-mail used during the transaction via the transaction ID?
If so, which API call(s) would be necessary to get the e-mail?
Thanks.
The GetTransactionDetails of the classic NVP/SOAP APIs will let you get the buyer's e-mail with only a transaction ID.
Info is here: https://developer.paypal.com/docs/classic/api/merchant/GetTransactionDetails_API_Operation_NVP/

PayPal REST API equivalent of GetExpressCheckoutDetails

As far as I can tell, this doesn't exist yet, but I was wondering if anyone knew if there was an equivalent of the PayPal Payments Pro NVP call "GetExpressCheckoutDetails" in the new PayPal REST API.
The REST API documentation lists information on authorizing the sale and the redirect contains the token that would be used in Payments Pro but there's no docs on how to retrieve the Billing/Shipping info prior to executing the sale (after which I assume you can retrieve that information through the "Look up a payment resource" call of payments/payment/{id}
Tangential question in case PayPal official response comes in: Is recurring payment support coming to the REST API soon or will it be exclusive to PayPal Payments Pro?
You can look up a payment resource even before you execute it. However, we have a bug in the API that doesn't currently return the shipping information.

Pay with PayFlow and Refund with REST

I want ask,may i Pay with Payment Advanced what use Payflow,but refund use REST.I do this,but when i fefund,i get "Exception in HttpConnection Execute: Stream was not readable.".Now i want know is Payflow can use with REST,is anybody success do this.
Currently you cannot pay with Payflow and the refund with REST. The REST API uses a separate set of (resource) ids, this means that the REST API refund operation expects an id that comes from a payment made with the REST API.