{"_id":"59a45d2cd12e81000f842f29","category":{"_id":"59a45d2bd12e81000f842ee5","version":"59a45d2bd12e81000f842ee2","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-13T18:31:11.123Z","from_sync":false,"order":2,"slug":"paypal-transaction-service","title":"PayPal Transactions"},"user":"560d5913af97231900938124","project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"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-13T18:37:56.731Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"language":"text","code":""}]},"settings":"57ee593a21ceb20e0061959e","auth":"optional","params":[],"url":"/alt-transactions"},"isReference":true,"order":6,"body":"The Create PayPal Transaction request performs a transaction (purchase) using the PayPal payment method.\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Getting started with PayPal in BlueSnap\",\n  \"body\": \"Go to the [PayPal Guide](doc:paypal) for a walkthrough of implementing the PayPal payment method via the API. To use PayPal, you will need to first connect your PayPal and BlueSnap account, as described in the guide.\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\nSend an **[altTransaction](doc:alt-transaction)** object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`amount` &nbsp;&nbsp;&nbsp; *decimal* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payerInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [payerInfo](doc:payer-info))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaultedShopperId` &nbsp;&nbsp;&nbsp; *integer* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchantTransactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`softDescriptor` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionDescription` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionMetaData` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionMetaData](doc:transaction-meta-data))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionFraudInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionFraudInfo](doc:transaction-fraud-info))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paypalTransaction` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [paypalTransaction](doc:paypal-transaction))\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the request properties plus these additions:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaultedShopperId`\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paypalTransaction` is returned with the `paypalUrl` and `orderId` (see [paypalTransaction](doc:paypal-transaction))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processingInfo`\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraudResultInfo`\n\n<hr>\n\n##Examples \n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    },\\n    \\\"transactionFraudInfo\\\": {\\\"fraudSessionId\\\": 1234}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create PayPal Transaction Request: basic\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with payer info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 20781033,\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with vaulted shopper\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"merchantTransactionId\\\": 3,\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"transactionMetaData\\\": {\\\"metaData\\\": [\\n        {\\n            \\\"metaValue\\\": 20,\\n            \\\"metaKey\\\": \\\"stateTaxAmount\\\",\\n            \\\"metaDescription\\\": \\\"State Tax Amount\\\"\\n        },\\n        {\\n            \\\"metaValue\\\": 20,\\n            \\\"metaKey\\\": \\\"cityTaxAmount\\\",\\n            \\\"metaDescription\\\": \\\"City Tax Amount\\\"\\n        },\\n        {\\n            \\\"metaValue\\\": 10,\\n            \\\"metaKey\\\": \\\"shippingAmount\\\",\\n            \\\"metaDescription\\\": \\\"Shipping Amount\\\"\\n        }\\n    ]},\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with Merchant Transaction ID and metadata\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"transactionDescription\\\": \\\"Product description\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with transaction description\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"inContext\\\": true,\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with in-context checkout\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"merchantTransactionId\\\": \\\"A3bn43\\\",\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"recurring\\\": 1,\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"initial subscription payment\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": 100,\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\\"paypalSubscriptionId\\\": 1234567}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"recurring subscription payment\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"merchantTransactionId\\\": \\\"testtransaction1\\\",\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"amount\\\": \\\"100.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"payerInfo\\\": {\\n      \\\"firstName\\\": \\\"John\\\",\\n      \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"paypalTransaction\\\": {\\n      \\\"transactionType\\\": \\\"AUTH_ONLY\\\",\\n      \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\",\\n      \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n      \\\"maxAmount\\\": \\\"120.00\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create PayPal Transaction for Two-step flow\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"merchantTransactionId\\\": \\\"testtransaction1\\\",\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"amount\\\": \\\"100.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"payer-info\\\": {\\n      \\\"firstName\\\": \\\"John\\\",\\n      \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"paypalTransaction\\\": {\\n      \\\"transactionType\\\": \\\"SET_ORDER\\\",\\n      \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\",\\n      \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n      \\\"maxAmount\\\": \\\"120.00\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create PayPal Transaction for Three-step flow (Delayed Capture)\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-3SH38585JS3540821\\\",\\n        \\\"orderId\\\": 3979635\\n    },\\n    \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"Y\\\"}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create PayPal Transaction Response: 200 OK - basic\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-0SM33181BF217002W\\\",\\n        \\\"orderId\\\": 3979589\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - payer info\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 20781033,\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-9GY47037JY601890L\\\",\\n        \\\"orderId\\\": 3979591\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - vaulted shopper\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"merchantTransactionId\\\": 3,\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"transactionMetaData\\\": {\\\"metaData\\\": [\\n        {\\n            \\\"metaValue\\\": 20,\\n            \\\"metaKey\\\": \\\"stateTaxAmount\\\",\\n            \\\"metaDescription\\\": \\\"State Tax Amount\\\"\\n        },\\n        {\\n            \\\"metaValue\\\": 20,\\n            \\\"metaKey\\\": \\\"cityTaxAmount\\\",\\n            \\\"metaDescription\\\": \\\"City Tax Amount\\\"\\n        },\\n        {\\n            \\\"metaValue\\\": 10,\\n            \\\"metaKey\\\": \\\"shippingAmount\\\",\\n            \\\"metaDescription\\\": \\\"Shipping Amount\\\"\\n        }\\n    ]},\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-7GY45732D90677524\\\",\\n        \\\"orderId\\\": 3979657\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - Merchant Transaction ID and metadata\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-0SM33181BF217002W\\\",\\n        \\\"orderId\\\": 3979589\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - transaction description\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/checkoutnow?token=EC-4UU43831F40425709\\\",\\n        \\\"orderId\\\": 3979635,\\n        \\\"inContext\\\": true\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - in-context checkout\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"PENDING\\\"},\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout\\\",\\n        \\\"orderId\\\": 980111\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - initial subscription payment\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"processingInfo\\\": {\\\"processingStatus\\\": \\\"SUCCESS\\\"},\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"transactionId\\\": 38500786,\\n    \\\"paypalTransaction\\\": {\\\"paypalSubscriptionId\\\": 1234567}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - recurring subscription payment\"\n    },\n    {\n      \"code\": \"{\\n  \\\"alt-transaction\\\": {\\n    \\\"-xmlns\\\": \\\"http://ws.plimus.com\\\",\\n    \\\"merchantTransactionId\\\": \\\"A3bn43\\\",\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"amount\\\": \\\"100.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"payerInfo\\\": {\\n      \\\"firstName\\\": \\\"John\\\",\\n      \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"vaultedShopperId\\\": \\\"19587618\\\",\\n    \\\"paypalTransaction\\\": {\\n      \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-2FK36938XP960042T\\\",\\n      \\\"orderId\\\": \\\"4006145\\\"\\n    },\\n    \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"PENDING\\\" }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - two step flow\"\n    },\n    {\n      \"code\": \"{\\n  \\\"alt-transaction\\\": {\\n    \\\"-xmlns\\\": \\\"http://ws.plimus.com\\\",\\n    \\\"merchantTransactionId\\\": \\\"A3bn43\\\",\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"amount\\\": \\\"100.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"payerInfo\\\": {\\n      \\\"firstName\\\": \\\"John\\\",\\n      \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"vaultedShopperId\\\": \\\"19587618\\\",\\n    \\\"paypalTransaction\\\": {\\n      \\\"paypalUrl\\\": \\\"https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-2FK36938XP960042T\\\",\\n      \\\"orderId\\\": \\\"4006145\\\"\\n    },\\n    \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"PENDING\\\" }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - three step flow\"\n    }\n  ]\n}\n[/block]\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##Example Descriptions\nFor details about the above examples, see:\n  * [Basic Create PayPal Transaction](create-paypal-transaction#section-basic-create-paypal-transaction)\n  * [Create PayPal Transaction with payer info](/v2.0/docs/create-paypal-transaction#section-create-paypal-transaction-with-payer-info)\n  * [Create PayPal Transaction with vaulted shopper](/v2.0/docs/create-paypal-transaction#section-create-paypal-transaction-with-vaulted-shopper)\n  * [Create PayPal Transaction with Merchant Transaction ID and metadata](/v2.0/docs/create-paypal-transaction#section-create-paypal-transaction-with-merchant-transaction-id-and-metadata)\n  * [Create PayPal Transaction with transaction description](create-paypal-transaction#section-create-paypal-transaction-with-transaction-description)\n  * [Create PayPal Transaction with In-Context checkout](/v2.0/docs/create-paypal-transaction#section-create-paypal-transaction-with-in-context-checkout)\n  * [Create PayPal Transaction for initial subscription payment](/v2.0/docs/create-paypal-transaction#section-create-paypal-transaction-for-initial-subscription-payment)\n  * [Create PayPal Transaction for recurring subscription payment](/v2.0/docs/create-paypal-transaction#section-create-paypal-transaction-for-recurring-subscription-payment)\n\n\n###Basic Create PayPal Transaction\nThis example shows a basic Create PayPal Transaction request, containing the minimum required fields to process a single PayPal transaction. The request does not include any information about the shopper, so this may be a new shopper or a guest checkout. It does include the required fraud check info in the [transactionFraudInfo](doc:transaction-fraud-info) resource.\n\n###Create PayPal Transaction with payer info\nTo perform a Create PayPal Transaction and send information about the shopper, you'll need to include the `payerInfo` property within the [altTransaction](doc:alt-transaction) object. In this property, you can send information such as the shopper's first and last name, email, phone number, and address. See [payerInfo](doc:payer-info).\n\nAbove is an example of a Create PayPal Transaction request with the shopper's first and last name sent in the `payerInfo` property.\n\n###Create PayPal Transaction with vaulted shopper\nTo perform a Create PayPal Transaction with an existing vaulted shopper, you'll need to include the `vaultedShopperId` property within the [altTransaction](doc:alt-transaction) object.\n\n**Important**: If you set the `noShipping` property (in [paypalTransaction](doc:paypal-transaction)) to **0** or **2**, then the shopper's shipping address will be retrieved from PayPal, and the vaulted shopper will be automatically updated with that shipping address.\n\nAbove is an example of a Create PayPal Transaction request with an existing vaulted shopper with the ID 20781033.\n\n###Create PayPal Transaction with Merchant Transaction ID and metadata\nYou may wish to assign your own ID to each transaction, for example in order to track the transactions in your own internal systems. To do this, you will need to include the `merchantTransactionId` property within the [altTransaction](doc:alt-transaction) object.\n\nYou can also send metadata for the transaction, such as a description of the item, or tax or shipping information. To do this, you will need to include the `transactionMetaData` property within the [altTransaction](doc:alt-transaction) object.\n\nAbove is an example of a request that includes a Merchant Transaction ID (MTI), as well as metadata for the transaction, including state tax, city tax, and the shipping amount.\n\n###Create PayPal Transaction with transaction description\nBy default, the PayPal page will show the statement descriptor as the description of the product being purchased. If you prefer to show a different description, you can send it in the `transactionDescription` element.\n\nAbove is an example of a Create PayPal Transaction request with the `transactionDescription`.\n\n###Create PayPal Transaction with In-Context checkout\nIf you would like to enable [In-Context PayPal checkout](/v1.0/docs/paypal#section-in-context-checkout), set the `inContext` property in the [paypalTransaction](doc:paypal-transaction) object to **true**.\n\nAbove is an example of a request with In-Context checkout enabled.\n\n###Create PayPal Transaction for initial subscription payment\nIf you are managing subscriptions yourself (or through a third party), you can use the PayPal payment method for subscription payments. In the initial subscription payment, include the `recurring` property in the [paypalTransaction](doc:paypal-transaction) object, and set the value to **1**.\n\nAbove is an example of an initial subscription payment with PayPal.\n\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\n###Create PayPal Transaction for recurring subscription payment\nAfter you have processed an initial subscription payment using PayPal, you can then associate the recurring payments with the relevant subscription by including the `paypalSubscriptionId` in the [paypalTransaction](doc:paypal-transaction) object.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"How to get the subscription ID\",\n  \"body\": \"You can obtain the subscription ID in two ways:\\n* In the `subscriptionId` field in the Charge IPN that is sent once the initial payment is processed.\\n*or*\\n* By sending a [Retrieve PayPal Transaction](doc:paypal-retrieve) request once the payment has been processed.\"\n}\n[/block]\nAbove is an example of a recurring subscription payment with PayPal.\n\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\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, enter the request content below and then click **Try it!**\n\n**Tip**: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. *The request headers, including authorization, are already built in for you in this test area, so you should not include them here.*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 100,\\n    \\\"softDescriptor\\\": \\\"ABC COMPANY\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n        \\\"cancelUrl\\\": \\\"http://www.cancelURL.com\\\",\\n        \\\"returnUrl\\\": \\\"http://www.returnURL.com\\\",\\n      \\t\\\"transactionType\\\": \\\"SET_ORDER\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"create-paypal-transaction","type":"post","title":"Create PayPal Transaction"}

postCreate PayPal Transaction


Definition

{{ api_url }}{{ page_api_url }}

Documentation

The Create PayPal Transaction request performs a transaction (purchase) using the PayPal payment method.

Getting started with PayPal in BlueSnap

Go to the PayPal Guide for a walkthrough of implementing the PayPal payment method via the API. To use PayPal, you will need to first connect your PayPal and BlueSnap account, as described in the guide.

Try it in the API Explorer

Request Content

Send an altTransaction object, with the following:

      amount     decimal    required

      payerInfo     object    optional (see payerInfo)

      vaultedShopperId     integer    optional

      merchantTransactionId     string    optional

      softDescriptor     string    optional

      transactionDescription     string    optional

      currency     string    required

      transactionMetaData     object    optional (see transactionMetaData)

      transactionFraudInfo     object    optional (see transactionFraudInfo)

      paypalTransaction     object    required (see paypalTransaction)

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus these additions:

      vaultedShopperId

      paypalTransaction is returned with the paypalUrl and orderId (see paypalTransaction)

      processingInfo

      fraudResultInfo


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "returnUrl": "http://www.returnURL.com"
    },
    "transactionFraudInfo": {"fraudSessionId": 1234}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "returnUrl": "http://www.returnURL.com"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "vaultedShopperId": 20781033,
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "returnUrl": "http://www.returnURL.com"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "merchantTransactionId": 3,
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "transactionMetaData": {"metaData": [
        {
            "metaValue": 20,
            "metaKey": "stateTaxAmount",
            "metaDescription": "State Tax Amount"
        },
        {
            "metaValue": 20,
            "metaKey": "cityTaxAmount",
            "metaDescription": "City Tax Amount"
        },
        {
            "metaValue": 10,
            "metaKey": "shippingAmount",
            "metaDescription": "Shipping Amount"
        }
    ]},
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "returnUrl": "http://www.returnURL.com"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "softDescriptor": "ABC COMPANY",
    "transactionDescription": "Product description",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "returnUrl": "http://www.returnURL.com"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "inContext": true,
        "returnUrl": "http://www.returnURL.com"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "merchantTransactionId": "A3bn43",
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "recurring": 1,
        "returnUrl": "http://www.returnURL.com"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": 100,
    "currency": "USD",
    "paypalTransaction": {"paypalSubscriptionId": 1234567}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "merchantTransactionId": "testtransaction1",
    "softDescriptor": "ABC COMPANY",
    "amount": "100.00",
    "currency": "USD",
    "payerInfo": {
      "firstName": "John",
      "lastName": "Doe"
    },
    "paypalTransaction": {
      "transactionType": "AUTH_ONLY",
      "returnUrl": "http://www.returnURL.com",
      "cancelUrl": "http://www.cancelURL.com",
      "maxAmount": "120.00"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "merchantTransactionId": "testtransaction1",
    "softDescriptor": "ABC COMPANY",
    "amount": "100.00",
    "currency": "USD",
    "payer-info": {
      "firstName": "John",
      "lastName": "Doe"
    },
    "paypalTransaction": {
      "transactionType": "SET_ORDER",
      "returnUrl": "http://www.returnURL.com",
      "cancelUrl": "http://www.cancelURL.com",
      "maxAmount": "120.00"
    }
}

Response Examples

{
    "amount": 100,
    "vaultedShopperId": 1234,
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-3SH38585JS3540821",
        "orderId": 3979635
    },
    "fraudResultInfo": {"deviceDataCollector": "Y"}
}
{
    "amount": 100,
    "vaultedShopperId": 1234,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-0SM33181BF217002W",
        "orderId": 3979589
    }
}
{
    "amount": 100,
    "vaultedShopperId": 20781033,
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-9GY47037JY601890L",
        "orderId": 3979591
    }
}
{
    "amount": 100,
    "vaultedShopperId": 1234,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "merchantTransactionId": 3,
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "transactionMetaData": {"metaData": [
        {
            "metaValue": 20,
            "metaKey": "stateTaxAmount",
            "metaDescription": "State Tax Amount"
        },
        {
            "metaValue": 20,
            "metaKey": "cityTaxAmount",
            "metaDescription": "City Tax Amount"
        },
        {
            "metaValue": 10,
            "metaKey": "shippingAmount",
            "metaDescription": "Shipping Amount"
        }
    ]},
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-7GY45732D90677524",
        "orderId": 3979657
    }
}
{
    "amount": 100,
    "vaultedShopperId": 1234,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-0SM33181BF217002W",
        "orderId": 3979589
    }
}
{
    "amount": 100,
    "vaultedShopperId": 1234,
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/checkoutnow?token=EC-4UU43831F40425709",
        "orderId": 3979635,
        "inContext": true
    }
}
{
    "amount": 100,
    "vaultedShopperId": 1234,
    "processingInfo": {"processingStatus": "PENDING"},
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout",
        "orderId": 980111
    }
}
{
    "amount": 100,
    "vaultedShopperId": 1234,
    "processingInfo": {"processingStatus": "SUCCESS"},
    "currency": "USD",
    "transactionId": 38500786,
    "paypalTransaction": {"paypalSubscriptionId": 1234567}
}
{
  "alt-transaction": {
    "-xmlns": "http://ws.plimus.com",
    "merchantTransactionId": "A3bn43",
    "softDescriptor": "ABC COMPANY",
    "amount": "100.00",
    "currency": "USD",
    "payerInfo": {
      "firstName": "John",
      "lastName": "Doe"
    },
    "vaultedShopperId": "19587618",
    "paypalTransaction": {
      "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-2FK36938XP960042T",
      "orderId": "4006145"
    },
    "processingInfo": { "processingStatus": "PENDING" }
  }
}
{
  "alt-transaction": {
    "-xmlns": "http://ws.plimus.com",
    "merchantTransactionId": "A3bn43",
    "softDescriptor": "ABC COMPANY",
    "amount": "100.00",
    "currency": "USD",
    "payerInfo": {
      "firstName": "John",
      "lastName": "Doe"
    },
    "vaultedShopperId": "19587618",
    "paypalTransaction": {
      "paypalUrl": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-2FK36938XP960042T",
      "orderId": "4006145"
    },
    "processingInfo": { "processingStatus": "PENDING" }
  }
}

Back to Top


Example Descriptions

For details about the above examples, see:

Basic Create PayPal Transaction

This example shows a basic Create PayPal Transaction request, containing the minimum required fields to process a single PayPal transaction. The request does not include any information about the shopper, so this may be a new shopper or a guest checkout. It does include the required fraud check info in the transactionFraudInfo resource.

Create PayPal Transaction with payer info

To perform a Create PayPal Transaction and send information about the shopper, you'll need to include the payerInfo property within the altTransaction object. In this property, you can send information such as the shopper's first and last name, email, phone number, and address. See payerInfo.

Above is an example of a Create PayPal Transaction request with the shopper's first and last name sent in the payerInfo property.

Create PayPal Transaction with vaulted shopper

To perform a Create PayPal Transaction with an existing vaulted shopper, you'll need to include the vaultedShopperId property within the altTransaction object.

Important: If you set the noShipping property (in paypalTransaction) to 0 or 2, then the shopper's shipping address will be retrieved from PayPal, and the vaulted shopper will be automatically updated with that shipping address.

Above is an example of a Create PayPal Transaction request with an existing vaulted shopper with the ID 20781033.

Create PayPal Transaction with Merchant Transaction ID and metadata

You may wish to assign your own ID to each transaction, for example in order to track the transactions in your own internal systems. To do this, you will need to include the merchantTransactionId property within the altTransaction object.

You can also send metadata for the transaction, such as a description of the item, or tax or shipping information. To do this, you will need to include the transactionMetaData property within the altTransaction object.

Above is an example of a request that includes a Merchant Transaction ID (MTI), as well as metadata for the transaction, including state tax, city tax, and the shipping amount.

Create PayPal Transaction with transaction description

By default, the PayPal page will show the statement descriptor as the description of the product being purchased. If you prefer to show a different description, you can send it in the transactionDescription element.

Above is an example of a Create PayPal Transaction request with the transactionDescription.

Create PayPal Transaction with In-Context checkout

If you would like to enable In-Context PayPal checkout, set the inContext property in the paypalTransaction object to true.

Above is an example of a request with In-Context checkout enabled.

Create PayPal Transaction for initial subscription payment

If you are managing subscriptions yourself (or through a third party), you can use the PayPal payment method for subscription payments. In the initial subscription payment, include the recurring property in the paypalTransaction object, and set the value to 1.

Above is an example of an initial subscription payment with PayPal.

For more information, see the guide to processing merchant-managed PayPal subscriptions.

Create PayPal Transaction for recurring subscription payment

After you have processed an initial subscription payment using PayPal, you can then associate the recurring payments with the relevant subscription by including the paypalSubscriptionId in the paypalTransaction object.

How to get the subscription ID

You can obtain the subscription ID in two ways:

  • In the subscriptionId field in the Charge IPN that is sent once the initial payment is processed.
    or
  • By sending a Retrieve PayPal Transaction request once the payment has been processed.

Above is an example of a recurring subscription payment with PayPal.

For more information, see the guide to processing merchant-managed PayPal subscriptions.



Back to Top


API Explorer

To test out a call, enter the request content below and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{
    "amount": 100,
    "softDescriptor": "ABC COMPANY",
    "currency": "USD",
    "paypalTransaction": {
        "cancelUrl": "http://www.cancelURL.com",
        "returnUrl": "http://www.returnURL.com",
      	"transactionType": "SET_ORDER"
    }
}

User Information

Try It Out


post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}