Payment approval does not redirect to return_url in sandbox

karel_s
Contributor
Contributor
When creating an order using /v2/checkout/orderswith
{
"intent": "CAPTURE",
"purchase_units": {"..."},
"payment_source": {
"paypal": {
"experience_context": {
"payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED",
"payment_method_selected": "PAYPAL",
"brand_name": "Brand name",
"landing_page": "LOGIN",
"user_action": "PAY_NOW",
"shipping_preference": "NO_SHIPPING",
"return_url": "https://example.com/success",
"cancel_url": "https://example.com/back",
}
}
}
}
I get a response with HATEOAS link with rel: approveand I redirect there.

Upon logging in and approving the payment I am not redirected back to return_urlbut I get stuck in
an infinite loop of approval.

I also tried specifying return_urlusing Payment Experience Profiles (/v1/payment-experience/web-profiles)
but the result is the same.

How should I specify the return_urlproperly so that I am redirected back to my checkout page?
Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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