How to make a charge with paypal API v2 without using the smart buttons?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm updating my paypal code on a website since paypal API v1 has been deprecated but I can't seem to find anywhere in the docs how to do it. The flow is quite simple: user selects paypal as the payment service and hits next, I redirect the user to paypal to insert the payment details, paypal redirects back so I can process the order accordingly.
The API V2 seems to focus on the smart buttons but that doesn't fit on the current UX I have. Looking through the docs I can't find the necessary endpoint to achieve that. Currently, with the V1 I have a web profile and I just call /v1/payments/payment with all the order information and callback URL and that's it.
On V2, I haven't found any endpoint that accepts a callback URL, for example. My first attempt was to create an order by calling /v2/checkout/orders, which does create the order and gives me back the HATEOAS links so I can redirect the user to paypal to enter the payment details but I haven't set anywhere the callback URL. So, where does it go after the user pays the order? I couldn't test it because when I use the sandbox to try to pay for it, it gives some generic error.
What am I missing?
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Webhook event "Payment capture refunded" is not sent by PayPal in REST APIs
- Using Paypal Smart Buttons for checkout sometimes fails with Debit/ Credit Cards Form in Braintree Client-side Integration (JS, iOS, Android SDKs)
- paypal buttons can't show in PayPal Payments Standard
- Sandbox testing has beaten me !! in Sandbox Environment
- Sandbox account not generating IPNs in Sandbox Environment