Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 514

Paypal landing page "BILLING" is not working

$
0
0

"BILLING" Option is not working with paypal orders checkout API for landing_page paramter.

I'm trying to use the paypal ordering APIs to create a payment flow where I send the product details and I want the user to enter the credit card details or paypal account to complete the payment then registering the web-hook and the return_url to confirm the order, I tried to use the landing_page option to be setup to "BILLING" as the documentation says, but I keep getting

"details": [        {"field": "/payment_source/paypal/experience_context/landing_page","value": "BILLING","location": "body","issue": "INVALID_PARAMETER_VALUE","description": "The value of a field is invalid."        }    ],

then I tried to use an example from their postman collection which is referenced in their docs, and I got the same error

Here is my full request without the access token

curl --location 'https://api-m.sandbox.paypal.com/v2/checkout/orders' \--header 'Content-Type: application/json' \--header 'PayPal-Request-Id: bdd7e8a2-9f0a-473c-8026-064a259d0fa9' \--data-raw '{"intent": "CAPTURE","payment_source": {"paypal": {"experience_context": {"return_url": "https://example.com/return","cancel_url": "https://example.com/cancel","brand_name": "EXAMPLE INC","locale": "en-US","landing_page": "BILLING","shipping_preference": "SET_PROVIDED_ADDRESS","user_action": "PAY_NOW","payment_method": {"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED","standard_entry_class_code": "TEL"                },"preferred_payment_source": {"token": {"type": "BILLING_AGREEMENT","id": "B-30983582ES210193W"                    }                }            }        }    },"purchase_units": [        {"reference_id": "PUHF","description": "Sporting Goods","invoice_id": 1745779653,"custom_id": "CUST-HighFashions","soft_descriptor": "HighFashions","amount": {"currency_code": "USD","value": "225.00","breakdown": {"item_total": {"currency_code": "USD","value": "200.00"                    },"shipping": {"currency_code": "USD","value": "0.00"                    },"handling": {"currency_code": "USD","value": "10.00"                    },"tax_total": {"currency_code": "USD","value": "20.00"                    },"shipping_discount": {"currency_code": "USD","value": "0.00"                    },"discount": {"currency_code": "USD","value": "5.00"                    }                }            },"payee": {"email_address": "sb-jgbqn12111212@business.example.com","merchant_id": "65MXV4T2ZV6KY","display_data": {"business_email": "support@example.com","business_phone": {"country_code": "1","national_number": "18882211161","extension_number": "9"                    },"brand_name": "Example Business"                }            },"items": [                {"name": "Flight Ticket","description": "From SFO to MAA","sku": "sku01","unit_amount": {"currency_code": "USD","value": "200.00"                    },"tax": {"currency_code": "USD","value": "20.00"                    },"quantity": "1","category": "DIGITAL_GOODS"                }            ],"supplementary_data": {"airline": [                    {"ticket": {"number": "045-2135145561","issue_date": "2018-01-19","issuing_carrier_code": "AI","travel_agency_name": "World Tours","travel_agency_code": "01"                        },"passenger": {"name": {"full_name": "Trini George"                            },"date_of_birth": "1981-05-31","country_code": "US"                        },"flight_leg_details": [                            {"flight_number": 101,"carrier_code": "AI","service_class": "J","departure_date": "2018-02-15","departure_time": "15:30","departure_airport": "SFO","arrival_airport": "DBX","stopover_code": "X","fare_basis_code": "SPRSVR"                            },                            {"flight_number": 102,"carrier_code": "AI","service_class": "J","departure_date": "2018-02-15","departure_time": "19:05","departure_airport": "DBX","arrival_airport": "MAA","stopover_code": "O","fare_basis_code": "SPRSVR"                            }                        ]                    }                ]            }        }    ]}'

And this is the response

{"name": "INVALID_REQUEST","message": "Request is not well-formed, syntactically incorrect, or violates schema.","debug_id": "f416452e98671","details": [        {"field": "/payment_source/paypal/experience_context/landing_page","value": "BILLING","location": "body","issue": "INVALID_PARAMETER_VALUE","description": "The value of a field is invalid."        }    ],"links": [        {"href": "https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_VALUE","rel": "information_link","encType": "application/json"        }    ]}

The docs link https://developer.paypal.com/docs/api/orders/v2/


Viewing all articles
Browse latest Browse all 514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>