I am sending this request to PayPal in my checkout:
Request >>>> {
"intent": "authorize",
"payer": {
"payment_method": "paypal"
},
"transactions": [
{
"amount": {
"total": "2386.81",
"currency": "GBP",
"details": {
"subtotal": "1854.81",
"shipping": "532.00",
"tax": "0.00"
}
},
"item_list": {
"shipping_address": {
"recipient_name": "Johnny",
"type": "business",
"line1": "245",
"line2": "5th Avenue ",
"city": "Columbia -",
"country_code": "US",
"postal_code": "MO 65201",
"phone": "001 212 12345678"
}
},
"description": "907 items"
}
],
"redirect_urls": {
"return_url": "http://localhost:3000/payment/paypal-approved",
"cancel_url": "http://localhost:3000/payment/paypal-cancelled"
}
}
but I am getting the following error:
{
"cause": {
"response": {
"name": "UNKNOWN_ERROR",
"message": "An unknown error has occurred",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#UNKNOWN_ERROR",
"debug_id": "b005dc4a36cc6",
"httpStatusCode": 400
},
"httpStatusCode": 400
},
"isOperational": true,
"response": {
"name": "UNKNOWN_ERROR",
"message": "An unknown error has occurred",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#UNKNOWN_ERROR",
"debug_id": "b005dc4a36cc6",
"httpStatusCode": 400
},
"httpStatusCode": 400
}
if I change the address to any other country, except Canada, the request works.
looking at the documentation, https://developer.paypal.com/docs/api/#address-object, only line1, city and country_code are required.
is there anything specific i am missing, for USA and Canada that i may have missed?