Advertisement
Khawaga

Untitled

Mar 25th, 2017
2,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.68 KB | None | 0 0
  1. curl -v -X POST https://api.sandbox.paypal.com/v1/payments/payment \
  2. -H "Content-Type:application/json" \
  3. -H "Authorization: Bearer Access-Token" \
  4. -d '{
  5.  "intent": "sale",
  6.  "payer": {
  7.  "payment_method": "paypal"
  8.  },
  9.  "transactions": [
  10.  {
  11.    "amount": {
  12.    "total": "30.11",
  13.    "currency": "USD",
  14.    "details": {
  15.      "subtotal": "30.00",
  16.      "tax": "0.07",
  17.      "shipping": "0.03",
  18.      "handling_fee": "1.00",
  19.      "shipping_discount": "-1.00",
  20.      "insurance": "0.01"
  21.    }
  22.    },
  23.    "description": "This is the payment transaction description.",
  24.    "custom": "EBAY_EMS_90048630024435",
  25.    "invoice_number": "48787589673",
  26.    "payment_options": {
  27.    "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
  28.    },
  29.    "soft_descriptor": "ECHI5786786",
  30.    "item_list": {
  31.    "items": [
  32.      {
  33.      "name": "hat",
  34.      "description": "Brown color hat",
  35.      "quantity": "5",
  36.      "price": "3",
  37.      "tax": "0.01",
  38.      "sku": "1",
  39.      "currency": "USD"
  40.      },
  41.      {
  42.      "name": "handbag",
  43.      "description": "Black color hand bag",
  44.      "quantity": "1",
  45.      "price": "15",
  46.      "tax": "0.02",
  47.      "sku": "product34",
  48.      "currency": "USD"
  49.      }
  50.    ],
  51.    "shipping_address": {
  52.      "recipient_name": "Hello World",
  53.      "line1": "4thFloor",
  54.      "line2": "unit#34",
  55.      "city": "SAn Jose",
  56.      "country_code": "US",
  57.      "postal_code": "95131",
  58.      "phone": "011862212345678",
  59.      "state": "CA"
  60.    }
  61.    }
  62.  }
  63.  ],
  64.  "note_to_payer": "Contact us for any questions on your order.",
  65.  "redirect_urls": {
  66.  "return_url": "http://www.amazon.com",
  67.  "cancel_url": "http://www.hawaii.com"
  68.  }
  69. }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement