Show payment details to buyer

Optionally, you can show payment details to the buyer on a confirmation page.

To get payment details, use the self link from the HATEOAS links of the create payment response.

This sample request uses the payment ID from the self link returned in the create payment response:

curl -v -X GET https://api.sandbox.paypal.com/v1/payments/payment/PAY-0US81985GW1191216KOY7OXA \
  -H "Content-Type:application/json" \
  -H "Authorization: Bearer Access-Token" 

The response shows payment details:

{
  "id": "PAY-0US81985GW1191216KOY7OXA",
  "create_time": "2017-06-30T23:48:44Z",
  "update_time": "2017-06-30T23:49:27Z",
  "state": "approved",
  "intent": "order",
  "payer": {
    "payment_method": "paypal"
  },
  "transactions": [
    {
      "amount": {
        "total": "41.15",
        "currency": "USD",
        "details": {
          "subtotal": "30.00",
          "tax": "1.15",
          "shipping": "10.00"
        }
      },
      "description": "The payment transaction description.",
      "item_list": {
        "items": [
          {
            "name": "hat",
            "sku": "1",
            "price": "3.00",
            "currency": "USD",
            "quantity": "5"
          },
          {
            "name": "handbag",
            "sku": "product34",
            "price": "15.00",
            "currency": "USD",
            "quantity": "1"
          }
        ],
        "shipping_address": {
          "recipient_name": "John Doe",
          "line1": "4th Floor, One Lagoon Drive",
          "line2": "Unit #34",
          "city": "Redwood City",
          "state": "CA",
          "phone": "4084217591",
          "postal_code": "94065",
          "country_code": "US"
        }
      },
      "related_resources": [
        {
          "authorization": {
            "id": "53P09338XY5426455",
            "create_time": "2017-06-30T23:50:01Z",
            "update_time": "2017-06-30T23:50:01Z",
            "amount": {
              "total": "41.15",
              "currency": "USD"
            },
            "parent_payment": "PAY-0US81985GW1191216KOY7OXA",
            "valid_until": "2017-07-29T23:49:52Z",
            "links": [
              {
                "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0US81985GW1191216KOY7OXA",
                "rel": "parent_payment",
                "method": "GET"
              }
            ]
          }
        }
      ]
    }
  ],
  "links": [
    {
      "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0US81985GW1191216KOY7OXA",
      "rel": "self",
      "method": "GET"
    }
  ]
}

Additional information