{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"paypal-transaction","type":"basic","slug":"paypal-transaction","excerpt":"Contains information required to process a PayPal transaction","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, up to 1000 characters.\",\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](doc: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, up to 1000 characters.\"\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](/docs/paypal#section-what-is-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]","updates":[],"order":35,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f43d7f192d43e01ff6f1142","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Resources","slug":"resources","order":16,"from_sync":false,"reference":false,"_id":"5f43d7f192d43e01ff6f111c","version":"5f43d7f192d43e01ff6f11c2","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-15T16:20:51.519Z","__v":0},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"version":{"version":"8976-XML","version_clean":"8976.0.0-XML","codename":"3.35 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5f43d7f192d43e01ff6f1110","5f43d7f192d43e01ff6f1111","5f43d7f192d43e01ff6f1112","5f43d7f192d43e01ff6f1113","5f43d7f192d43e01ff6f1114","5f43d7f192d43e01ff6f1115","5f43d7f192d43e01ff6f1116","5f43d7f192d43e01ff6f1117","5f43d7f192d43e01ff6f1118","5f43d7f192d43e01ff6f1119","5f43d7f192d43e01ff6f111a","5f43d7f192d43e01ff6f111b","5f43d7f192d43e01ff6f111c","5f43d7f192d43e01ff6f111d","5f43d7f192d43e01ff6f111e","5f43d7f192d43e01ff6f111f","5f43d7f192d43e01ff6f1120","5f43d7f192d43e01ff6f1121","5f47e410bd05ef0011069965"],"_id":"5f43d7f192d43e01ff6f11c2","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"5ed5174637c3c607440c0a3c","createdAt":"2018-04-24T15:24:22.608Z","releaseDate":"2018-04-24T15:24:22.608Z"},"createdAt":"2016-01-06T17:57:36.225Z","githubsync":"","__v":0}

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, up to 1000 characters.

cancel-url

string

Required
only for transactions that are not recurring

URL where the shopper will be redirected if cancelling the PayPal purchase, up to 1000 characters.

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.