Cannot create Experience / WebProfile
schattke
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Aug-17-2018
12:38 AM
Hello, we are working on a PayPal Plus Integration. Login via OAuth, creating Payments, patching, executing, works. But unfortunately, we cannot create an Experience / WebProfile through the API. We work in the sandbox and are using your .Net SDK but also tried with a simple HttpClient. Example with SDK: var oProfile = new PayPal.Api.WebProfile() { presentation = new PayPal.Api.Presentation() { brand_name = "Hello World", locale_code = "DE" }, input_fields = new PayPal.Api.InputFields() { allow_note = false, no_shipping = 0, address_override = 1 } }; var oResponse = oProfile.Create(oContext); Response: Der Remoteserver hat einen Fehler zurückgegeben: (400) Ungültige Anforderung. Example with HttpClient: dynamic oRequest = new ExpandoObject(); oRequest.brand_name = "Hello World"; oRequest.locale_code = "DE"; oRequest.allow_note = false; oRequest.no_shipping = 0; oRequest.address_override = 1; string sJson = Json.Encode(new DynamicJsonObject(oRequest)); var oContent = new StringContent(sJson, UnicodeEncoding.UTF8, "application/json"); HttpClient oClient = new HttpClient(); oClient.SetBearerToken(oToken.AccessToken); var oPut = oClient.PutAsync(sEndpoint + "v1/payment-experience/webprofiles", oContent).Result; sResult = oPut.Content.ReadAsStringAsync().Result; Response: Internal Server Error What could be the problem? Why is there really no form in the backend to create Experiences / WebProfiles? Best Regards Mirko Schattke
1 REPLY 1

Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct-01-2018
08:19 AM
Hello,
First, request an access token.
Second, edit the request attached to this response to add your own data and then submit the request via cURL. I don't code in .NET so I cannot advise you in that regard.
This works fine for me every time.
Was my post helpful? If so, please give me a kudos!

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Buttons and Links Error in PayPal Upgrade Community
- Payment link guest checkout in PayPal Payments Standard
- Logging in redirects our customers to an error page instead of billing agreement approval in REST APIs
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Creating a customized checkout experience in PayPal Payments Standard