Paypal Authorize and Capture with partial refund and avoid - paypal

1) Buyer purchase a product from seller and authroize from PayPal
2) Due to XYZ reason buyer cancel partial order
3) Now, seller need to capture a partial amount and void remaining amount
I have perform following action in PayPal
1) Authorize API using following API : (300$ of authroize)
https://developer.paypal.com/docs/api/payments/#payment_create
intent : authroize
2) Capture a partial amount (Lesser amount than authroize - 200$ of capture)
https://developer.paypal.com/docs/api/payments/#capture
amount : 200
So I want to do 200$ capture and 100$ return to buyer
Now which API need to use to release remaining authroize funds to buyer?

There is nothing to return or refund for an authorization.
If you do a partial capture on an authorization the rest of the authorization $100 should just drop off.
For eg if the buyer used credit card with a remaining credit balance of $1000 and you authorized they will see a pending transaction for $300 ( available credit drops to $700) - once you capture $200 the available credit should jump to ($800)
Are the buyers complaining that this isn’t the case ?

You can void the authorization after the partial capture is done to instantly release the hold funds. If the authorization is not voided, the funds should be released after 3 days from the time of authorization.
Refer here for the API details.

Related

In Authorization & Capture process, when paypal charge the commission?

I have read documentation about Authorization and Capture process , i have something similar to, Case 1:
1-Your buyer orders a camera from your website.
2-Your buyer enters payment information and authorizes payment.
3-Send your buyer to PayPal using a hosted flow, specifying the variable paymentaction=authorization
4-PayPal initiates the authorization.
5-On day 29, you ship the camera and capture funds.
But something similar can happen, Case 2:
1-Your buyer orders a camera from your website.
2-Your buyer enters payment information and authorizes payment.
3-Send your buyer to PayPal using a hosted flow, specifying the variable paymentaction=authorization
4-PayPal initiates the authorization.
5-On day 25 due some reasons (customer had cancel his reservation for example) i void authorization.
When paypal charge his commission in Case 1 and Case 2? If i void an authorization for a customer without capture money, paypal charge anyway his commission in transaction?
The transaction fee should be on the Capture since that's when PayPal will know the amount that's actually being moved from one person to another. As far as I know there isn't a fee for voiding an authorization since there was no actual money moved in the first place.

PayPal Rest API Update transactions

I am using the PayPal Rest API to implement PayPal into my website. The flow for my site is below.
Users selects PayPal to pay
Create payment in code
Send to PayPal to approve
Sent back to Step 2 of my order process
User can update the shipping method or apply a coupon code
User Submits the order
As you can see the amount and details of my order can be changed after I create the initial payment in Step 2 of my process. Also a user could update items/amounts on their order as well.
How do I update the transactions of a payment after it gets approved?
you should use Payment authorization:
PayPal Authorization & Capture is a settlement solution that provides increased flexibility in obtaining payments from buyers. During a traditional sale at PayPal, the authorization and capture action is completed simultaneously. PayPal Authorization & Capture separates the authorization of payment from the capture of the authorized payment.
Authorization & Capture is for merchants who have a delayed order fulfillment process and who typically make a $1 USD authorization at checkout. It enables merchants to modify the original authorization amount due to order changes (such as taxes, shipping, or item availability) that occur after the buyers place the initial order. This chapter discusses the authorization and capture process and provides steps to help you authorize, capture, reauthorize, and void funds.
Paypal doc
you need to impelemnt instant update callback:
Here is how the Instant Update API works
When a buyer logs in to PayPal, the PayPal server calls your callback server with the buyer's default shipping address, which is stored in the PayPal system.
Your callback server responds with the shipping options available for that address, along with any insurance options and tax adjustments on the order.
PayPal displays this information in the cart review area so buyers can choose from the options.
The buyer's final choices are returned in the GetExpressCheckoutDetails response.
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECInstantUpdateAPI/
hope this helps you

Paypal what is the different between future payments and orders

I have an IOS application that allow customers to purchase items, the items are available in about a week or 2. I'm trying to understand which payment method is fit my needs.
I read the documentation of Paypal mobile sdk and Paypal rest api and I don't understand what is the different between :
1.Future Payment - https://developer.paypal.com/docs/integration/mobile/make-future-payment/
2.Place and Order - https://developer.paypal.com/docs/integration/direct/create-process-order/
Does fureture payment place the funds on hold ?
Future Payment
Lets you set up a system where you can charge a PayPal account on demand. No funds are held, you're just given a token to process future charges, after the client authorizes it. This used to be called a Billing Agreement under Classic.
Orders
Basically lets you charge an authorization up to 10 times (up to 115% of the total amount). You can run this as an authorization to hold funds up to 29 days.

Prevent PayPal Payments with payKey (Or refund instead)

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.

what is the meaning of PAYMENTREQUEST_n_AMT in SetExpressCheckout and DoExpressCheckoutPayment?

I am using ExpressCheckout and testing Paypal in the sandbox. I've noticed if I set a higher amount of PAYMENTREQUEST_n_AMT in DoExpressCheckoutPayment() then in SetExpressCheckout() (e.g. $30 USD in SetExpressChecout(), $50 USD in DoExpressCheckoutPayment()), Paypal will transfer $50 USD to my sandbox business account from my sandbox personal account.
Is it because this is a sandbox server or something I should know ?
I am constructing a website which is required to charge an advance from the buyer and collect what remains of the net price a few days later. If this is a feature of Paypal Express Checkout, I will set the amount of advance in SetExpressCheckout() and the total Net Price in DoExpressCheckoutPayment(). Thereafter, the buyer will only see the advance amount in Paypal to decrease the confusion. If we said we only charge the advance, but in Paypal show the total amount of net price, it might cause confusion.
In my test it works in the sandbox, but Paypal will reply SUCCESSPAGEREDIRECTREQUESTED=true in this situation. Paypal documentation explains "Flag to indicate whether you would like to redirect the buyer to sign up for PayPal after completing the transaction." What does that mean?
Could you please clarify this for me?
This is not the way to go about doing this, as DoExpressCheckoutPayment needs to be completed within three hours of SetExpressCheckout being called (and having generated a TOKEN). What you'll want to use is PayPal Authorization & Capture (see also here).
Call SetExpressCheckout and DoExpressCheckoutPayment with the total
amount you wish to charge and ensure you pass
PAYMENTREQUEST_0_PAYMENTACTION=Authorization in both.
Call DoCapture and run a partial capture on the transaction. By running a partial capture, you leave the remainder open to be captured at a later date (COMPLETETYPE=NotComplete)
Once you're ready to capture the remainder, call DoCapture again and set COMPLETETYPE=Complete. After it a capture is completed, you cannot capture any more funds from that specific transaction ID, regardless of whether or not you captured the full amount or not.