{"_id":"59a45d467ee621000fc9d424","category":{"_id":"59a45d447ee621000fc9d3c4","version":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-15T16:20:51.519Z","from_sync":false,"order":12,"slug":"resources","title":"Resources"},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"version":{"_id":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-08-28T18:13:23.840Z","releaseDate":"2017-08-28T18:13:23.840Z","categories":["59a45d447ee621000fc9d3b8","59a45d447ee621000fc9d3b9","59a45d447ee621000fc9d3ba","59a45d447ee621000fc9d3bb","59a45d447ee621000fc9d3bc","59a45d447ee621000fc9d3bd","59a45d447ee621000fc9d3be","59a45d447ee621000fc9d3bf","59a45d447ee621000fc9d3c0","59a45d447ee621000fc9d3c1","59a45d447ee621000fc9d3c2","59a45d447ee621000fc9d3c3","59a45d447ee621000fc9d3c4","59a45d447ee621000fc9d3c5","59a45d447ee621000fc9d3c6","59a45d447ee621000fc9d3c7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.22.1","version_clean":"8976.0.0-XML","version":"8976-XML"},"__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":73,"body":"###Request\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required\",\n    \"0-0\": \"`transaction-type`\",\n    \"0-1\": \"*string*\",\n    \"h-3\": \"Description\",\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    \"3-0\": \"`req-confirm-shipping`\",\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\": \"`cancel-url`\",\n    \"2-1\": \"*string*\",\n    \"2-3\": \"URL where the shopper will be redirected if cancelling the PayPal purchase.\",\n    \"0-2\": \"**Required** for two-step and three step flow.\\n\\n**Optional** for standard redirect flow\",\n    \"2-2\": \"**Required**\\n*only for transactions that are not recurring*\",\n    \"4-0\": \"`no-shipping`\",\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\": \"`in-context`\",\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\": \"`paypal-subscription-id`\",\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    \"1-0\": \"`return-url`\",\n    \"1-1\": \"*string*\",\n    \"1-2\": \"**Required**\\n*only for transactions that are not recurring*\",\n    \"1-3\": \"URL where the shopper will be redirected upon completing the PayPal purchase.\"\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\": \"`paypal-url`\",\n    \"0-1\": \"*integer*\",\n    \"1-0\": \"`order-id`\",\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\": \"`in-context`\",\n    \"3-2\": \"ID of the PayPal subscription associated with this transaction.\",\n    \"3-1\": \"*string*\",\n    \"3-0\": \"`paypal-subscription-id`\"\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":"paypal-transaction"}

paypal-transaction

Contains information required to process a PayPal transaction

Request

Property Name
Type
Required
Description

transaction-type

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

return-url

string

Required
only for transactions that are not recurring

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

cancel-url

string

Required
only for transactions that are not recurring

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

req-confirm-shipping

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.

no-shipping

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.

in-context

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.

paypal-subscription-id

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

paypal-url

integer

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

order-id

integer

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

in-context

boolean

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

paypal-subscription-id

string

ID of the PayPal subscription associated with this transaction.