Rest | 400 | PAYMENT_NOT_APPROVED_FOR_EXECUTION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to create a program in Java which would create and execute the payment without any user interaction. I have created 2 methods, one for creating payment and another for executing the payment. The create payment method works fine and returns a payment Id. I am passing this created payment Id and a constant payer Id to execute payment method. While executing payment, I am getting this error.
name: PAYMENT_NOT_APPROVED_FOR_EXECUTION message: Payer has not approved payment
Later I found that Execute payment call works only after a customer has approved the payment.
Is there any way to approve the payment in Java without any user interaction ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to do this without User Interaction.
First I recorded the result of payment execute.
Once I have that, I used nock to intercept the payment execute and have the return result equal to the one I recorded earlier.
Hope it helps

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- Charge a customer for the remaining balance after a purchase has been made? in REST APIs
- "issue": "NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE" in REST APIs
- Error payment in PayPal Payments Standard
- Authorization failed due to insufficient permissions in Sandbox Environment