0
votes

I'd like to use this endpoint to display the calculated fees on my site before taking the user to the paypal site; however, when I query the endpoint with a valid payKey, I receive an internal error.

Endpoint: https://developer.paypal.com/docs/classic/api/adaptive-payments/GetPrePaymentDisclosure_API_Operation/

To generate the payKey, I'm POSTing to svcs.sandbox.paypal.com/AdapativePayments/Pay with the following request body: { "actionType":"PAY", "currencyCode":"USD", "feesPayer":"SENDER", "requestEnvelope": { "errorLanguage": "en_US" }, "cancelUrl":"test.com/cancel", "returnUrl":"test.com/return", "receiverList": { "receiver": [ { "email": "[email protected]", "amount": "80.00" } ] } }

Any ideas as to what's going on?

Note: I had to edit out the valid URLs because I don't have enough reputation.

1

1 Answers

0
votes

For GetPrePaymentDisclosure you must supply senderEmail in the PAY request for it to function.

This is because GetPrePaymentDisclosure is supposed to be used to determine the status of the transaction and see if it is covered by the Remittance Transfer Rule.

From the Documentation: This API is specific for merchants who must support the Consumer Financial Protection Bureau's Remittance Transfer Rule.

It does not work to determine the fees beforehand if it does not hit these rules. As all you will get back is [status] => NON_RTR with no information.

If you would like this functionality outside of RTR transactions you should submit a feature request on PayPal's Technical Support Site