We can't submit payments with item_list in sandbox. Everything works fine without it.
Here is our payload:
{
"transactions": [
{
"amount": { "total": "36.78", "currency": "SGD", "details": {} },
"invoice_number": "f9d5a670-6f5e-4a92-84f2-416acf09b87c",
"item_list": {
"items": [
{
"sku": "",
"name": "Item 2",
"description": "A wonderful product",
"quantity": "1",
"price": "15.03",
"currency": "SGD",
"tax": "7%"
},
{
"sku": "",
"name": "Item 3",
"description": "Another nice product",
"quantity": "1",
"price": "10.00",
"currency": "SGD",
"tax": "7%"
}
],
"shipping_address": {
"recipient_name": "Test User",
"line1": null,
"line2": null,
"city": null,
"country_code": "SG",
"postal_code": null,
"phone": null,
"state": null
}
}
}
],
"intent": "sale",
"redirect_urls": {
"return_url": "https://www.sandbox.paypal.com",
"cancel_url": "https://www.sandbox.paypal.com"
},
"payer": { "payment_method": "paypal" }
}
And here is the response:
{
"name": "VALIDATION_ERROR",
"details": [
{
"field": "transactions.item_list.items",
"issue": "Currency amount must be non-negative number, may optionally contain exactly 2 decimal places separated by '.', optional thousands separator ',', limited to 7 digits before the decimal point and currency which is a valid ISO Currency Code"
}
],
"message": "Invalid request - see details",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "f1b6b37ac8e2"
}
... View more