cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice API - Request is not well-formed, syntactically incorrect, or violates schema

Options
Go to solution
MTS_Stefan
Moderator

Hello Ayrancd,

 

What do you mean by public URL? 

Sandbox means sandbox, no emails are sent so you will not receive any other, then in dev portal > notifications.

You should see it in both accounts unless the receiver account was spelled differently in which case the system will assign it to an account that does not exist. In live that non-existing email address would receive an email about an invoice and the request to create an account to handle it.

The GET calls are just to gain access to all details of a transaction / invoice.

 

Kind Regards,

Stefan

Invoice API - Request is not well-formed, syntactically incorrect, or violates schema

Options
Go to solution
pzauner
Contributor

Hello Stefan,

 

I have the same problem, but changing the invoicer's name, surname and email to the one on the business paypal account did not sort it out.

I do the API call in Python with the request library. My data dictionary looks like this, I can print it, so syntactically everything should be fine.

 

{'detail': {'invoice_date': '2021-08-19', 'currency_code': 'EUR', 'note': 'Danke für Ihren Einkauf!', 'term': 'Rückerstattungen bis 2 Werktage vor Termin'}, 'invoicer': {'name': {'given_name': 'Max', 'surname': 'Mustermann'}, 'address': {'address_line_1': 'Test Str. 20', 'address_line_2': 'Etage 2', 'admin_area_2': 'Teststadt', 'admin_area_1': 'BY', 'postal_code': '12345', 'country_code': 'DE'}, 'email_address': 'mail thats used in the paypal business account', 'phones': [{'country_code': '0049', 'national_numer': '1711433650', 'phone_type': 'MOBILE'}], 'website': 'www.lernwelt.de'}, 'primary_recipients': [{'billing_info': {'name': {'given_name': 'Patrick', 'surname': 'Zauner'}, 'address': {'address_line_1': 'Freibierstraße 2', 'admin_area_2': 'Teststadt', 'postal_code': '12345', 'country_code': 'DE'}, 'email_address': 'buyers mail'}, 'shipping_info': {'name': {'given_name': 'Patrick', 'surname': 'Zauner'}, 'address': {'address_line_1': 'Freibierstraße 2', 'admin_area_2': 'Teststadt', 'postal_code': '12345', 'country_code': 'DE'}}}], 'items': [{'name': 'Nachhilfestunde', 'description': '2. Klasse, Mathe, Kommentar: Addition und Subtraktion bis 100', 'quantity': '1', 'unit_amount': {'currency_code': 'EUR', 'value': '10.00'}, 'unit_of_measure': 'QUANTITY'}]}

 

Do you have any idea why I still get an INVALID_REQUEST back ?

{'name': 'INVALID_REQUEST', 'message': 'Request is not well-formed, syntactically incorrect, or violates schema.', 'debug_id': '95555fd4d8d2c', 'details': [], 'links': [{'href': 'https://developer.paypal.com/docs/api/invoicing/#errors', 'method': 'GET'}]}

 

kind regards,

 

Patrick

Haven't Found your Answer?

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