Pay with Paypal through Paypal REST API does not show up payment description on Paypal Sandbox or live sites

Parijat Kalia picture Parijat Kalia · Apr 8, 2013 · Viewed 9.5k times · Source

I am implementing Paypal's new REST API Pay with Paypal method that can be referenced here: https://developer.paypal.com/webapps/developer/docs/integration/web/accept-paypal-payment/

The payment executes fine, exactly the way it should be. The user chooses to pay with Paypal and is then redirected to the Paypal site where he is expected to log in and approve the payment. The JSON data that I am sending Paypal is pretty much what is specified in the above link and mine looks like this:

{
  "intent":"sale",
  "redirect_urls":{
    "return_url":"http://<return URL here>",
    "cancel_url":"http://<cancel URL here>"
  },
  "payer":{
    "payment_method":"paypal"
  },
  "transactions":[
    {
      "amount":{
        "total":"7.47",
        "currency":"USD"
      },
      "description":"This is the payment description."
    }
  ]

}

As it redirects the user to the paypal website, the description and total amount column is shown blank

I am not sure if this is a mistake on Paypal's REST API but I believe I am providing the necessary description + amount payment to be reflected on this page. If this information is not shown, it is typically a deterrent to the user since they would definitely like to see the amount they are paying on the Paypal site even though this amount is listed on my website.

This is what it looks like:

enter image description here

For those who would like to indicate that the user has not logged in, well, even after logging in, the description and the current purchase column remain blank.

Am I missing any parameters that need to be sent to Paypal in order to indicate this description data?

Note: This issue persists for both the live and sandbox servers.

Answer

Deepesh Dwivedi picture Deepesh Dwivedi · Apr 9, 2013

The left hand pan in above page displays: 1. Item details from order. You can include item list as part of the transaction details in payment resource. The same will be displayed here. 2. Components of the transaction amount e.g. shipping amount, tax, etc. if you include them in request.

Try this request to see example:

{
    "intent": "sale",
    "payer": {
        "payment_method": "paypal"
    },
    "redirect_urls": {
        "return_url": "http://<return url>",
        "cancel_url": "http://<cancle url>"
    },
    "transactions": [
        {
            "amount": {
                "total": "8.00",
                "currency": "USD",
                "details": {
                    "subtotal": "6.00",
                    "tax": "1.00",
                    "shipping": "1.00"
                }
            },
            "description": "This is payment description.",
            "item_list": { 
                "items":[
                    {
                        "quantity":"3", 
                        "name":"Hat", 
                        "price":"2.00",  
                        "sku":"product12345", 
                        "currency":"USD"
                    }
                ]
            }
        }
    ]
}