Skip to content

Instantly share code, notes, and snippets.

@githubsaturn
Created December 17, 2021 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save githubsaturn/c44a85e457e820ce60b744ac5b106bb0 to your computer and use it in GitHub Desktop.
Save githubsaturn/c44a85e457e820ce60b744ac5b106bb0 to your computer and use it in GitHub Desktop.
{
"info": {
"_postman_id": "6e144ca0-1d90-461e-ab75-88f7dbb93bdc",
"name": "PayPal REST API Simulation - Payouts",
"description": "The PayPal sandbox environment enables you to pass specific information in a request to trigger simulated positive and negative test scenarios. The simulated responses mimic actual API responses without calling downstream services. You can handle these responses in your code to manage your buyer’s experience.\n\nThis collection provides 4 examples of different simulations. For a complete list of negative and positive simulations you can send, visit our [Test Payouts developer docs](https://developer.paypal.com/docs/payouts/integrate/test-payouts/#show-payout).",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "PayPal Payment",
"item": [
{
"name": "====V1====",
"request": {
"method": "GET",
"header": [],
"url": null
},
"response": []
},
{
"name": "Get an Access Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"access_token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
}
]
},
"url": {
"raw": "https://api-m.sandbox.paypal.com/v1/oauth2/token",
"protocol": "https",
"host": [
"api-m",
"sandbox",
"paypal",
"com"
],
"path": [
"v1",
"oauth2",
"token"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": [
{
"name": "Get an access_token",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
}
]
},
"url": {
"raw": "{{host}}/v1/oauth2/token",
"host": [
"{{host}}"
],
"path": [
"v1",
"oauth2",
"token"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Date",
"value": "Mon, 26 Nov 2018 16:58:38 GMT"
},
{
"key": "Server",
"value": "Apache"
},
{
"key": "paypal-debug-id",
"value": "5f1cd661d8871"
},
{
"key": "X-PAYPAL-TOKEN-SERVICE",
"value": "IAAS"
},
{
"key": "HTTP_X_PP_AZ_LOCATOR",
"value": "sandbox.slc"
},
{
"key": "Paypal-Debug-Id",
"value": "5f1cd661d8871"
},
{
"key": "Set-Cookie",
"value": "X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D1042742363%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Mon, 26 Nov 2018 17:28:39 GMT; domain=.paypal.com; path=/; Secure; HttpOnly"
},
{
"key": "Set-Cookie",
"value": "X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT"
},
{
"key": "Vary",
"value": "Authorization"
},
{
"key": "Content-Length",
"value": "710"
},
{
"key": "Connection",
"value": "close"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"scope\": \"https://uri.paypal.com/services/disputes/read-seller https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/disputes/read-buyer https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/payments/payouts https://uri.paypal.com/services/disputes/update-seller https://api.paypal.com/v1/vault/credit-card/.*\",\n \"nonce\": \"2018-11-26T16:58:38ZVydyI9rkIcm4YjBJloZ4ijEnI7-6-xWUk590tbDNVtI\",\n \"access_token\": \"B72EFHKYm4mlJGmFLGY34TJ4hdxpocNLTQGGle9E3UGhWZ0W61GmMmY5JS_vb9isvB01UH6M1ByanBmo3Cl4c6wlYQnjjzxdA\",\n \"token_type\": \"Bearer\",\n \"app_id\": \"APP-12W484485P519543T\",\n \"expires_in\": 32399\n}"
}
]
},
{
"name": "Create Payment",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"payment_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"intent\": \"sale\",\n \"payer\": {\n \"payment_method\": \"paypal\"\n },\n \"transactions\": [\n {\n \"amount\": {\n \"total\": \"50.00\",\n \"currency\": \"USD\"\n },\n \"description\": \"Bill Id\"\n }\n ],\n \"redirect_urls\": {\n \"return_url\": \"https://example.com/return\",\n \"cancel_url\": \"https://example.com/cancel\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/payment",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"payment"
]
}
},
"response": []
},
{
"name": "Get Last Payment",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.sandbox.paypal.com/v1/payments/payment/{{payment_id}}",
"protocol": "https",
"host": [
"api",
"sandbox",
"paypal",
"com"
],
"path": [
"v1",
"payments",
"payment",
"{{payment_id}}"
]
}
},
"response": []
},
{
"name": "Execute Payment",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/formdata",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"payer_id\": \"88KCN9D7EYZZE\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/payment/{{payment_id}}/execute",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"payment",
"{{payment_id}}",
"execute"
]
}
},
"response": []
},
{
"name": "Get List of Payments",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{sandbox_url}}/v1/payments/payment",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"payment"
]
}
},
"response": []
},
{
"name": "Create Payment (Authorize)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"payment_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"intent\": \"sale\",\n \"payer\": {\n \"payment_method\": \"paypal\"\n },\n \"transactions\": [\n {\n \"amount\": {\n \"total\": \"30.00\",\n \"currency\": \"USD\"\n },\n \"payment_options\": {\n \"allowed_payment_method\": \"INSTANT_FUNDING_SOURCE\"\n }\n }\n ],\n \"redirect_urls\": {\n \"return_url\": \"https://example.com/return\",\n \"cancel_url\": \"https://example.com/cancel\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/payment",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"payment"
]
}
},
"response": []
},
{
"name": "Modify Last Payment",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/transactions/0/amount\",\n \"value\": {\n \"total\": \"18.37\",\n \"currency\": \"USD\",\n \"details\": {\n \"subtotal\": \"13.37\",\n \"shipping\": \"5.00\"\n }\n }\n },\n {\n \"op\": \"add\",\n \"path\": \"/transactions/0/item_list/shipping_address\",\n \"value\": {\n \"recipient_name\": \"Anna Gruneberg\",\n \"line1\": \"Kathwarinenhof 1\",\n \"city\": \"Flensburg\",\n \"postal_code\": \"24939\",\n \"country_code\": \"DE\"\n }\n }\n]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/payment/{{payment_id}}",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"payment",
"{{payment_id}}"
]
}
},
"response": []
},
{
"name": "====V2====",
"request": {
"method": "GET",
"header": [],
"url": null
},
"response": []
},
{
"name": "Get an Access Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"access_token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
}
]
},
"url": {
"raw": "https://api-m.sandbox.paypal.com/v1/oauth2/token",
"protocol": "https",
"host": [
"api-m",
"sandbox",
"paypal",
"com"
],
"path": [
"v1",
"oauth2",
"token"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": [
{
"name": "Get an access_token",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
}
]
},
"url": {
"raw": "{{host}}/v1/oauth2/token",
"host": [
"{{host}}"
],
"path": [
"v1",
"oauth2",
"token"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Date",
"value": "Mon, 26 Nov 2018 16:58:38 GMT"
},
{
"key": "Server",
"value": "Apache"
},
{
"key": "paypal-debug-id",
"value": "5f1cd661d8871"
},
{
"key": "X-PAYPAL-TOKEN-SERVICE",
"value": "IAAS"
},
{
"key": "HTTP_X_PP_AZ_LOCATOR",
"value": "sandbox.slc"
},
{
"key": "Paypal-Debug-Id",
"value": "5f1cd661d8871"
},
{
"key": "Set-Cookie",
"value": "X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D1042742363%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Mon, 26 Nov 2018 17:28:39 GMT; domain=.paypal.com; path=/; Secure; HttpOnly"
},
{
"key": "Set-Cookie",
"value": "X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT"
},
{
"key": "Vary",
"value": "Authorization"
},
{
"key": "Content-Length",
"value": "710"
},
{
"key": "Connection",
"value": "close"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"scope\": \"https://uri.paypal.com/services/disputes/read-seller https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/disputes/read-buyer https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/payments/payouts https://uri.paypal.com/services/disputes/update-seller https://api.paypal.com/v1/vault/credit-card/.*\",\n \"nonce\": \"2018-11-26T16:58:38ZVydyI9rkIcm4YjBJloZ4ijEnI7-6-xWUk590tbDNVtI\",\n \"access_token\": \"B72EFHKYm4mlJGmFLGY34TJ4hdxpocNLTQGGle9E3UGhWZ0W61GmMmY5JS_vb9isvB01UH6M1ByanBmo3Cl4c6wlYQnjjzxdA\",\n \"token_type\": \"Bearer\",\n \"app_id\": \"APP-12W484485P519543T\",\n \"expires_in\": 32399\n}"
}
]
},
{
"name": "Create an Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"payment_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"intent\": \"CAPTURE\",\n \"application_context\": {\n \"return_url\": \"https://example.com\",\n \"cancel_url\": \"https://example.com\"\n },\n \"purchase_units\": [\n {\n \"reference_id\": \"test\",\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"100.00\"\n }\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v2/checkout/orders",
"host": [
"{{sandbox_url}}"
],
"path": [
"v2",
"checkout",
"orders"
]
}
},
"response": []
},
{
"name": "Show Order Details",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v2/checkout/orders/{{payment_id}}",
"host": [
"{{sandbox_url}}"
],
"path": [
"v2",
"checkout",
"orders",
"{{payment_id}}"
]
}
},
"response": []
},
{
"name": "Show Order Details Copy",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "[\n {\n \"op\": \"add\",\n \"path\": \"/purchase_units/@reference_id=='test'/shipping/address\",\n \"value\": {\n \"address_line_1\": \"123 Townsend St\",\n \"address_line_2\": \"Floor 6\",\n \"admin_area_2\": \"San Francisco\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"94107\",\n \"country_code\": \"US\"\n }\n }\n]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v2/checkout/orders/{{payment_id}}",
"host": [
"{{sandbox_url}}"
],
"path": [
"v2",
"checkout",
"orders",
"{{payment_id}}"
]
}
},
"response": []
},
{
"name": "Authorize Payment For Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v2/checkout/orders/{{payment_id}}/authorize",
"host": [
"{{sandbox_url}}"
],
"path": [
"v2",
"checkout",
"orders",
"{{payment_id}}",
"authorize"
]
}
},
"response": []
},
{
"name": "Capture an Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v2/checkout/orders/{{payment_id}}/capture",
"host": [
"{{sandbox_url}}"
],
"path": [
"v2",
"checkout",
"orders",
"{{payment_id}}",
"capture"
]
}
},
"response": []
}
]
},
{
"name": "PayPal Subscription",
"item": [
{
"name": "====1====",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"plan_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Test Regular Payment\",\n \"description\": \"Test Regular Payment\",\n \"type\": \"FIXED\",\n \"payment_definitions\": [\n {\n \"name\": \"Test regular payment\",\n \"type\": \"REGULAR\",\n \"frequency\": \"MONTH\",\n \"frequency_interval\": \"1\",\n \"amount\": {\n \"value\": \"30.99\",\n \"currency\": \"USD\"\n },\n \"cycles\": \"12\"\n }\n ],\n \"merchant_preferences\": {\n \"setup_fee\": {\n \"value\": \"1\",\n \"currency\": \"USD\"\n },\n \"return_url\": \"https://example.com\",\n \"cancel_url\": \"https://example.com/cancel\",\n \"auto_bill_amount\": \"YES\",\n \"initial_fail_amount_action\": \"CONTINUE\",\n \"max_fail_attempts\": \"0\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/billing-plans",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"billing-plans"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "Create Product",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"product_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n\n \"name\": \"Axil Ecommerce Services\"\n\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/catalogs/products",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"catalogs",
"products"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "Create Plan",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"plan_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"product_id\": \"{{product_id}}\",\n \"name\": \"Axil Ecommerce Services\",\n \"status\": \"ACTIVE\",\n \"billing_cycles\": [\n {\n \"frequency\": {\n \"interval_unit\": \"MONTH\",\n \"interval_count\": 1\n },\n \"tenure_type\": \"REGULAR\",\n \"sequence\": 1,\n \"total_cycles\": 12,\n \"pricing_scheme\": {\n \"fixed_price\": {\n \"value\": \"10\",\n \"currency_code\": \"USD\"\n }\n }\n }\n ],\n \"payment_preferences\": {\n \"auto_bill_outstanding\": true,\n \"setup_fee\": {\n \"value\": \"10\",\n \"currency_code\": \"USD\"\n },\n \"setup_fee_failure_action\": \"CONTINUE\",\n \"payment_failure_threshold\": 3\n },\n \"taxes\": {\n \"percentage\": \"10\",\n \"inclusive\": false\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/billing/plans",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"billing",
"plans"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "Create Subscription",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"subscription_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
},
{
"key": "PayPal-Request-Id",
"value": "SUBSCRIPTION-21092019-001",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"plan_id\": \"{{plan_id}}\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/billing/subscriptions",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"billing",
"subscriptions"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "====2==== (Not Working)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"plan_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Test Regular Payment\",\n \"description\": \"Test Regular Payment\",\n \"type\": \"FIXED\",\n \"payment_definitions\": [\n {\n \"name\": \"Test regular payment\",\n \"type\": \"REGULAR\",\n \"frequency\": \"MONTH\",\n \"frequency_interval\": \"1\",\n \"amount\": {\n \"value\": \"30.99\",\n \"currency\": \"USD\"\n },\n \"cycles\": \"12\"\n }\n ],\n \"merchant_preferences\": {\n \"setup_fee\": {\n \"value\": \"1\",\n \"currency\": \"USD\"\n },\n \"return_url\": \"https://example.com\",\n \"cancel_url\": \"https://example.com/cancel\",\n \"auto_bill_amount\": \"YES\",\n \"initial_fail_amount_action\": \"CONTINUE\",\n \"max_fail_attempts\": \"0\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/billing-plans",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"billing-plans"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "Create Billing Plans",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"plan_id\", jsonData.id);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Test Regular Payment\",\n \"description\": \"Test Regular Payment\",\n \"type\": \"FIXED\",\n \"payment_definitions\": [\n {\n \"name\": \"Test regular payment\",\n \"type\": \"REGULAR\",\n \"frequency\": \"MONTH\",\n \"frequency_interval\": \"1\",\n \"amount\": {\n \"value\": \"30.99\",\n \"currency\": \"USD\"\n },\n \"cycles\": \"12\"\n }\n ],\n \"merchant_preferences\": {\n \"setup_fee\": {\n \"value\": \"1\",\n \"currency\": \"USD\"\n },\n \"return_url\": \"https://example.com\",\n \"cancel_url\": \"https://example.com/cancel\",\n \"auto_bill_amount\": \"YES\",\n \"initial_fail_amount_action\": \"CONTINUE\",\n \"max_fail_attempts\": \"0\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/billing-plans",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"billing-plans"
]
}
},
"response": []
},
{
"name": "Active Plan",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "PATCH",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/\",\n \"value\": {\n \"state\": \"ACTIVE\"\n }\n }\n]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/billing-plans/{{plan_id}}",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"billing-plans",
"{{plan_id}}"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "Create Agreement",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"execute_agreement_link\", jsonData.links[1].href);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Override Agreement\",\n \"description\": \"PayPal payment agreement that overrides merchant preferences and shipping fee and tax information.\",\n \"start_date\": \"2021-12-22T09:13:49Z\",\n \"payer\": {\n \"payment_method\": \"paypal\",\n \"payer_info\": {\n \"email\": \"sb-dnwlc6816530@personal.example.com\"\n }\n },\n \"plan\": {\n \"id\": \"{{plan_id}}\"\n },\n \"override_merchant_preferences\": {\n \"return_url\": \"https://example.com/\",\n \"cancel_url\": \"https://example.com/cancel\",\n \"auto_bill_amount\": \"YES\",\n \"initial_fail_amount_action\": \"CONTINUE\",\n \"max_fail_attempts\": \"11\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/billing-agreements",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"billing-agreements"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "Execute Last Agreement",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v1/payments/billing-agreements/EC-78M324674B9227949/agreement-execute",
"host": [
"{{baseUrl}}"
],
"path": [
"v1",
"payments",
"billing-agreements",
"EC-78M324674B9227949",
"agreement-execute"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
},
{
"name": "List plans",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://api-m.sandbox.paypal.com/v1/payments/billing-plans?page_size=3&status=ALL&page_size=2&page=1&total_required=yes",
"protocol": "https",
"host": [
"api-m",
"sandbox",
"paypal",
"com"
],
"path": [
"v1",
"payments",
"billing-plans"
],
"query": [
{
"key": "page_size",
"value": "3"
},
{
"key": "status",
"value": "ALL"
},
{
"key": "page_size",
"value": "2"
},
{
"key": "page",
"value": "1"
},
{
"key": "total_required",
"value": "yes"
}
]
}
},
"response": []
},
{
"name": "Get Billing Plans",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "ELtuwFUY5CgJJ5r_cdBrQMd1M3Ph8gt5eO_-xXjcAh0UbJOaF_qpoNqKyufVhH-TPxLgN5B20WiEz8XK",
"type": "string"
},
{
"key": "username",
"value": "ATmB61i4k7quMltrrfQ8IBGK4pCwbTbStBoi11Od1z4PES4_1zm9y-hdOYkAPle_yUdqZ_1qEAHzk4Td",
"type": "string"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "GET",
"header": [
{
"key": "Accept-Language",
"type": "text",
"value": "en_US"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
},
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{sandbox_url}}/v1/payments/billing-plans/{{plan_id}}",
"host": [
"{{sandbox_url}}"
],
"path": [
"v1",
"payments",
"billing-plans",
"{{plan_id}}"
]
},
"description": "The PayPal REST API uses the OAuth 2.0 protocol to authorize calls. OAuth is an open standard that many companies use to provide secure access to protected resources. \n\nWhen you create a REST app in the PayPal Developer Dashboard, PayPal generates a set of OAuth <code>client_id</code> and <code>secret</code> credentials for your app for both the sandbox and live environments. In the Postman app, you pass these as username and password Basic Auth credentials in the Authorization tab of the <a href=\"https://developer.paypal.com/docs/api/overview/#make-your-first-call\" target=\"_blank\">GET access token request</a>. Postman will base64 encode the credentials for you and add the Basic Auth header to the request.\n\nIn exchange for these credentials, the PayPal authorization server issues a Bearer token, called <code>access_token</code>, that you use for authorization when you make REST API requests. The <code>access_token</code> enables you to complete actions on behalf and with the approval of the resource owner."
},
"response": []
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment