I thought I read somewhere that you don't refund a DoReferenceTransaction and just refund the transaction that was referenced. I could of swore it worked but now it just does not.
Does PayPal have a feature where you can refund all reference transactions by refunding the parent or do I need to individually refund each reference transaction?
If the latter is true is there a way to refund multiple transactions without multiple calls to PayPal?
No. Each transaction is an individual transaction and would need to be refunded using the RefundTransaction API one-at-a-time.
Related
I am trying to prevent paypal for allowing a payment I have created.
The scenario:
My App is creating a Payment. I get the payKey from PayPal and the Customer is redirected to PayPal.
When the Customer is not able to finish the Payment after 2 minutes I will delete the Order for him and then - if possible - I will force Paypal that the payment is not active anymore and the customer is not able to pay after these 2 minutes. For this I have to do at least of this:
send Paypal the payKey and tell Paypal: Do not allow to pay with this payKey! Just "Delete" the information for this order
after the customer paid - but after 2 minutes, so the order is deleted - I will tell Paypal the payKey and a refund has to be done right after the customer has paid. This is no problem I thought but because its an AdaptivePayment and chained paypal is not allowing me to refund the money because every receiver in the refund receiverList needs permissions to allow a refund by API Call.
So my question is:
Is it possible to prevent a Payment with an API call ? I did not find any information in the REST API Reference of PayPal.
The payKey cannot be deleted or change the expire duration. You can use delayed chained payment with IPN. You are the API caller and primary receiver, compare the transaction complete time with the paykey generation time to decide refund or pay secondary receivers.
I am currently developing a web application which is a booking system for events.
Basically i want to use PayPal's Delayed Chained Payments system to do this:
BUYER makes a purchase through web app
ADMIN is the primary receiver of the funds
SELLER receives the funds 7 days after the event has occurred (less commission for ADMIN)
The reason i am leaving a 7 day period until the SELLER receives the funds is to allow for refunds and cancellations.
My question is:
Does the API allow me to interveen the delayed payment before the 7 days has elapsed, thus cancelling the payment to the SELLER and allow me to directly refund the BUYER the full amount. This is my ideal situation as it means their will not be the problem of the SELLERS account not having sufficient funds for the refund.
If anyone could help it would be great!
With Delayed Chained Payments you'll have the ability to cancel or execute the payment whenever you need to (within 90 days). So if the seller isn't able to supply the product to the buyer (or whatever reason) you can cancel the transaction.
Submitting a refund after a payment has been executed is a little tricky.
So to do a refund for a Chained Payment transaction you'll need to use the Permission Services API calls for the receivers to allow you to process refunds on their behalf. If they don't, you cannot refund the payment sent to another recipient.
After make delayed chained payment if you are not execute payment to secondary receiver then you can refund full amount of payment using refund api Call but you need to grand third party access .using grant api access
I have been working on Reference Transactions. Is it possible to create a Billing Agreement using Do Direct Payment as it is not returning any token in the response ??
Thanks
There is no billing agreement that gets created with the DoDirectPayment API. In order to charge the buyer again, all you have to do is make the API call for a reference transaction and pass over the previous successful transaction id. Express Checkout would be the API that you would want to use if you want to set up a billing agreement.
When processing the Refund API to the payment made by AdaptivePayment Pay operation if the secondary receiver does not have enough money in their account
what happens to the API call? would it fail as whole or would the missing fees be draw out of primary receiver's account?
Testing this scenario with instant chained payment, and refund was cancelled. So obviously its all or none.
Is it possible to Create a Recurring Payment Profile using DoReferenceTransaction or is there any other way to set up recurring payment when I've got "billing agree" from customer and REFERENCEID - an id of customer's previous transaction.
Thanks
You can set
RECURRING
field of DoReferenceTransaction API call, but first you need a billing agreement with buyer.
I recommend doing recurring payment with CreateRecurringPaymentsProfile call.
API is here.
I've got billing agreement with buyer ("billing agreement ID") - according to reference transaction api .
I also can do transactions with DoReferenceTransaction like:
$nvpstr="&L_AMT0=".$itemamt."&L_QTY0=1&AMT=".(string)$amt."&ITEMAMT=".(string)$itemamt."&CALLBACKTIMEOUT=4&REFERENCEID=B-6J7244599E964634T&ReturnUrl=".$returnURL."&CANCELURL=".$cancelURL ."&CURRENCYCODE=".$currencyCodeType."&PAYMENTACTION=".$paymentType;
$resArray=hash_call("DoReferenceTransaction",$nvpstr);
However I still don't know how to set up recurring payment using reference transaction cause in API link you gave me, there is a note that Credit Card ACCT number is required - but I don't want to store client's card numbers in my database (I am using express checkout).