Show payment details to buyer

Important: Integration with checkout.js V3.5 is Deprecated. For the latest integration information, see the PayPal Express Checkout Integration Guide.

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-3WY97586JG9277715K3H2SOA \\
  -H "Content-Type:application/json" \\
  -H "Authorization: Bearer Access-Token"

The response shows payment details:

{
  "id": "PAY-3WY97586JG9277715K3H2SOA",
  "intent": "sale",
  "state": "created",
  "payer":
  {
    "payment_method": "paypal"
  },
  "transactions": [
  {
    "amount":
    {
      "total": "4.00",
      "currency": "USD",
      "details":
      {
        "subtotal": "2.00",
        "tax": "2.00",
        "shipping": "1.00",
        "shipping_discount": "-1.00"
      }
    },
    "description": "This is the payment transaction description.",
    "custom": "merchant custom data",
    "invoice_number": "merchant invoice",
    "item_list":
    {
      "items": [
      {
        "name": "item 1",
        "description": "item 1 description",
        "price": "1.00",
        "currency": "USD",
        "tax": "1.00",
        "quantity": 1
      },
      {
        "name": "item 2",
        "description": "item 2 description",
        "price": "1.00",
        "currency": "USD",
        "tax": "1.00",
        "quantity": 1
      }]
    },
    "related_resources": [

    ]
  }],
  "create_time": "2016-02-26T01:24:08Z",
  "links": [
  {
    "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-3WY97586JG9277715K3H2SOA",
    "rel": "self",
    "method": "GET"
  },
  {
    "href": "https://www.sandbox.paypal.com/checkoutnow?token=EC-7YM73725XF342733W",
    "rel": "approval_url",
    "method": "REDIRECT"
  },
  {
    "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-3WY97586JG9277715K3H2SOA/execute",
    "rel": "execute",
    "method": "POST"
  }]
}

Additional information

Next

Execute the payment.