(400) Bad Request for execute payment (express checkout with REST API)

CoderA
Contributor
Contributor

Account: Sandbox

 

The create payment (API: https://api.sandbox.paypal.com/v1/payments/payment) is creating the payment and returning the success status.

The Authorize function returns a payer id which is passed to execute API (API: https://api.sandbox.paypal.com/v1/payments/payment/<paymentId>/execute/), which returns a bad request.

 

I have verified the correctness of the Authorization token, payment Id and the payer id, and they are as expected.

 

 

Kindly help. Kindly let me know if I need to furnish more details.

Login to Me Too
2 REPLIES 2

LRodrigues
Contributor
Contributor

I have the same problem.

The payment is created successfully, but I can't execute it.

Login to Me Too

LRodrigues
Contributor
Contributor

Well... I was using a model I copied from somewhere in the documentation, then I realized there was a invoice_number parameter. This parameter must be unique and it is not validated by the time you create the payment, but when you execute the payment.
Hope this helps.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.