{"_id":"59a45d2cd12e81000f842f4b","category":{"_id":"59a45d2bd12e81000f842eee","version":"59a45d2bd12e81000f842ee2","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-15T16:20:51.519Z","from_sync":false,"order":11,"slug":"resources","title":"JSON Objects"},"parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","version":{"_id":"59a45d2bd12e81000f842ee2","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-08-28T18:12:59.168Z","releaseDate":"2017-08-28T18:12:59.168Z","categories":["59a45d2bd12e81000f842ee3","59a45d2bd12e81000f842ee4","59a45d2bd12e81000f842ee5","59a45d2bd12e81000f842ee6","59a45d2bd12e81000f842ee7","59a45d2bd12e81000f842ee8","59a45d2bd12e81000f842ee9","59a45d2bd12e81000f842eea","59a45d2bd12e81000f842eeb","59a45d2bd12e81000f842eec","59a45d2bd12e81000f842eed","59a45d2bd12e81000f842eee","59a45d2bd12e81000f842eef","59a45d2bd12e81000f842ef0","59a45d2bd12e81000f842ef1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.22.1","version_clean":"8976.0.0-JSON","version":"8976-JSON"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-06T17:57:36.225Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":69,"body":"###Request\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required\",\n    \"1-0\": \"`returnUrl`\",\n    \"1-1\": \"*string*\",\n    \"h-3\": \"Description\",\n    \"1-3\": \"URL where the shopper will be redirected upon completing the PayPal purchase.\",\n    \"3-0\": \"`reqConfirmShipping`\",\n    \"3-2\": \"Optional\",\n    \"3-3\": \"Determines whether the buyer's shipping address on file with PayPal must be a confirmed address. \\n\\nValues can be:\\n  * **0**: Does not have to be a confirmed address.\\n  * **1**: Must be a confirmed address.\",\n    \"3-1\": \"*integer*\",\n    \"2-0\": \"`cancelUrl`\",\n    \"2-1\": \"*string*\",\n    \"2-3\": \"URL where the shopper will be redirected if cancelling the PayPal purchase.\",\n    \"1-2\": \"**Required**\\n*only for transactions that are not recurring*\",\n    \"2-2\": \"**Required**\\n*only for transactions that are not recurring*\",\n    \"4-0\": \"`noShipping`\",\n    \"4-1\": \"*integer*\",\n    \"4-2\": \"Optional\",\n    \"4-3\": \"Determines whether PayPal displays shipping address fields on the PayPal pages. \\n\\nValues can be:\\n  * **0**: PayPal displays the shipping address fields.\\n  * **1**: PayPal does not display the shipping address fields.\\n  * **2**: If you do not pass the shipping address, PayPal obtains it from the shopper's account profile.\",\n    \"5-0\": \"`inContext`\",\n    \"5-1\": \"*boolean*\",\n    \"5-2\": \"Optional\",\n    \"5-3\": \"Set value to **true** in order to use In-Context PayPal checkout.\\nWhen set to true, PayPal will return a URL for In-Context checkout.\\nFor more information, see [The shopper experience with PayPal (Express checkout vs In-Context checkout)](/docs/paypal#section-the-shopper-experience-with-paypal-express-checkout-vs-in-context-checkout-).\",\n    \"6-0\": \"`recurring`\",\n    \"7-0\": \"`paypalSubscriptionId`\",\n    \"6-1\": \"*string*\",\n    \"7-1\": \"*string*\",\n    \"6-2\": \"Optional\",\n    \"7-2\": \"Optional\",\n    \"6-3\": \"If this is the initial payment for a subscription, include this property and set the value to **1**.\",\n    \"7-3\": \"ID of the PayPal subscription associated with this transaction.\\n\\nWhen processing recurring payments for a subscription, include this property in order to associate the payments with the relevant subscription. \\nFor more information, see the [guide to processing merchant-managed PayPal subscriptions](/v2.0/docs/subscription-management#section-processing-merchant-managed-paypal-subscription-payments).\",\n    \"0-0\": \"`transactionType`\",\n    \"0-1\": \"*string*\",\n    \"0-2\": \"**Required** for two-step and three step flow.\\n\\n**Optional** for standard redirect flow\",\n    \"0-3\": \"Defines the action that will occur in the transaction request.\\n`AUTH_CAPTURE`\\n`AUTH_ONLY`\\n`CAPTURE`\\n`SET_ORDER`\\n`DO_ORDER`\"\n  },\n  \"cols\": 4,\n  \"rows\": 8\n}\n[/block]\n###Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`paypalUrl`\",\n    \"0-1\": \"*integer*\",\n    \"1-0\": \"`orderId`\",\n    \"1-1\": \"*integer*\",\n    \"0-2\": \"URL to redirect the shopper to the purchase page in PayPal.\",\n    \"1-2\": \"Order ID used to retrieve transaction before the purchase has been completed, when there is not yet a transaction ID.\",\n    \"2-2\": \"Indicates whether [In-Context PayPal checkout](/v1.0/docs/paypal#section-in-context-checkout) is used. If so, PayPal returns a URL for In-Context checkout.\",\n    \"2-1\": \"*boolean*\",\n    \"2-0\": \"`inContext`\",\n    \"3-2\": \"ID of the PayPal subscription associated with this transaction.\",\n    \"3-1\": \"*string*\",\n    \"3-0\": \"`paypalSubscriptionId`\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","excerpt":"Contains information required to process a PayPal transaction","slug":"paypal-transaction","type":"basic","title":"paypalTransaction"}

paypalTransaction

Contains information required to process a PayPal transaction

Request

Property Name
Type
Required
Description

transactionType

string

Required for two-step and three step flow.

Optional for standard redirect flow

Defines the action that will occur in the transaction request.
AUTH_CAPTURE
AUTH_ONLY
CAPTURE
SET_ORDER
DO_ORDER

returnUrl

string

Required
only for transactions that are not recurring

URL where the shopper will be redirected upon completing the PayPal purchase.

cancelUrl

string

Required
only for transactions that are not recurring

URL where the shopper will be redirected if cancelling the PayPal purchase.

reqConfirmShipping

integer

Optional

Determines whether the buyer's shipping address on file with PayPal must be a confirmed address.

Values can be:

  • 0: Does not have to be a confirmed address.
  • 1: Must be a confirmed address.

noShipping

integer

Optional

Determines whether PayPal displays shipping address fields on the PayPal pages.

Values can be:

  • 0: PayPal displays the shipping address fields.
  • 1: PayPal does not display the shipping address fields.
  • 2: If you do not pass the shipping address, PayPal obtains it from the shopper's account profile.

inContext

boolean

Optional

Set value to true in order to use In-Context PayPal checkout.
When set to true, PayPal will return a URL for In-Context checkout.
For more information, see The shopper experience with PayPal (Express checkout vs In-Context checkout).

recurring

string

Optional

If this is the initial payment for a subscription, include this property and set the value to 1.

paypalSubscriptionId

string

Optional

ID of the PayPal subscription associated with this transaction.

When processing recurring payments for a subscription, include this property in order to associate the payments with the relevant subscription.
For more information, see the guide to processing merchant-managed PayPal subscriptions.

Response

Property Name
Type
Description

paypalUrl

integer

URL to redirect the shopper to the purchase page in PayPal.

orderId

integer

Order ID used to retrieve transaction before the purchase has been completed, when there is not yet a transaction ID.

inContext

boolean

Indicates whether In-Context PayPal checkout is used. If so, PayPal returns a URL for In-Context checkout.

paypalSubscriptionId

string

ID of the PayPal subscription associated with this transaction.