{
	"info": {
		"_postman_id": "90e0c732-5f8d-4871-98df-213b9fbc1d84",
		"name": "Recurring Payments v3 - Collection",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "31688623"
	},
	"item": [
		{
			"name": "Access Token",
			"item": [
				{
					"name": "Get Access Token",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"access_token\", pm.response.json().access_token);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}"
							},
							{
								"key": "client_secret",
								"value": "{{client_secret}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{base_url}}/accessToken/get",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"accessToken",
								"get"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Agreement Controller",
			"item": [
				{
					"name": "Draft Agreement - Profile sharing flow",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"agreementId\", jsonData.agreementId)",
									"var str = jsonData.vippsConfirmationUrl",
									"var str2 = str.split('=', 3)[2]",
									"postman.setEnvironmentVariable(\"landing_page_url\", str2);",
									"",
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\",\n \"scope\": \"address name email birthDate phoneNumber\",\n \"productName\": \"{{productName}}\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Legacy pricing",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": {{intervalCount}}\n },\n \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\",\n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Legacy pricing and reserve initial charge",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"initialCharge\": {\n   \"amount\": {{amount_initial}},\n   \"description\": \"{{description_initial}}\",\n   \"transactionType\": \"RESERVE_CAPTURE\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Legacy pricing and direct capture initial charge",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"initialCharge\": {\n   \"amount\": {{amount_initial}},\n   \"description\": \"{{description_initial}}\",\n   \"transactionType\": \"DIRECT_CAPTURE\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Variable pricing",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n  \"pricing\": {\n    \"suggestedMaxAmount\": {{price}},\n    \"currency\": \"NOK\",\n    \"type\": \"VARIABLE\"\n },\n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Price campaign",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"campaign\": {\n    \"type\" : \"PRICE_CAMPAIGN\",\n    \"price\": {{campaignPrice}},\n    \"end\": \"2040-01-01T00:00:00Z\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Price campaign and initial charge",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"campaign\": {\n    \"type\" : \"PRICE_CAMPAIGN\",\n    \"price\": {{campaignPrice}},\n    \"end\": \"2040-01-01T00:00:00Z\"\n },\n  \"initialCharge\": {\n   \"amount\": {{amount_initial}},\n   \"description\": \"{{description_initial}}\",\n   \"transactionType\": \"DIRECT_CAPTURE\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Period campaign",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"campaign\": {\n    \"type\" : \"PERIOD_CAMPAIGN\",\n    \"price\": {{campaignPrice}},\n    \"period\": {\n        \"unit\" : \"DAY\",\n        \"count\": \"2\"\n    }\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Period campaign and initial charge",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"campaign\": {\n    \"type\" : \"PERIOD_CAMPAIGN\",\n    \"price\": {{campaignPrice}},\n    \"period\": {\n        \"unit\" : \"DAY\",\n        \"count\": \"2\"\n    }\n },\n  \"initialCharge\": {\n   \"amount\": {{amount_initial}},\n   \"description\": \"{{description_initial}}\",\n   \"transactionType\": \"DIRECT_CAPTURE\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Event campaign",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"campaign\": {\n    \"type\": \"EVENT_CAMPAIGN\",\n    \"price\": {{campaignPrice}},\n    \"eventDate\": \"2040-12-25T00:00:00Z\",\n    \"eventText\": \"Until Christmas\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Draft Agreement - Event campaign and initial charge",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"agreementId\", pm.response.json().agreementId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n \"campaign\": {\n    \"type\": \"EVENT_CAMPAIGN\",\n    \"price\": {{campaignPrice}},\n    \"eventDate\": \"2040-12-25T00:00:00Z\",\n    \"eventText\": \"Until Christmas\"\n },\n  \"initialCharge\": {\n   \"amount\": {{amount_initial}},\n   \"description\": \"{{description_initial}}\",\n   \"transactionType\": \"DIRECT_CAPTURE\"\n },\n \"interval\": {\n    \"unit\" : \"{{interval}}\",\n    \"count\": \"{{intervalCount}}\"\n },\n  \"pricing\": {\n    \"amount\": {{price}},\n    \"currency\": \"NOK\"\n },\n \"merchantRedirectUrl\": \"{{merchantRedirectUrl}}\",\n \"merchantAgreementUrl\": \"{{merchantAgreementUrl}}\",\n \"phoneNumber\": \"{{mobileNumber}}\", \n \"productName\": \"{{productName}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Get Agreement",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"sub\", jsonData.sub);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						},
						"description": "GET one agreement (script based on last created Agreement)"
					},
					"response": []
				},
				{
					"name": "List Agreements",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"continuation_token\", pm.response.headers.get(\"Continuation-Token\"));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Continuation-Token",
								"value": "{{continuation_token}}",
								"type": "default",
								"disabled": true
							}
						],
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements"
							],
							"query": [
								{
									"key": "status",
									"value": "{{status_agreements}}",
									"disabled": true
								},
								{
									"key": "createdAfter",
									"value": "1644572442944",
									"disabled": true
								}
							]
						},
						"description": "Does a GET and retrieves all agreements based on the MerchantId in the header"
					},
					"response": []
				},
				{
					"name": "(Test only) Force accept agreement",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "bearer {{access_token}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"phoneNumber\": \"{{mobileNumber}}\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/accept",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"accept"
							]
						},
						"description": "Drafts an agreement that can be approved by end user"
					},
					"response": []
				},
				{
					"name": "Stop Agreement",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"status\": \"STOPPED\"\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Agreement - Product name",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"productName\":\"{{productName_updated}}\"\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Agreement - Product description",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"productName\":\"{{productDescription_updated}}\"\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Agreement - Merchant agreement url",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"merchantAgreementUrl\":\"{{merchantAgreementUrl}}\"\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Agreement - Legacy pricing amount",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"pricing\": {\r\n        \"amount\": {{price}}\r\n    }\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Agreement - Suggested max amount",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var uuid = require('uuid')\r",
									"pm.environment.set(\"idempotency_key\", uuid.v4())"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"pricing\": {\r\n        \"suggestedMaxAmount\": {{price}}\r\n    }\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Charge Controller",
			"item": [
				{
					"name": "Create Charge - Direct capture",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"chargeId\", jsonData.chargeId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var tomorrow = new Date();\r",
									"tomorrow.setDate(tomorrow.getDate() + 2);\r",
									"tomorrowString = [tomorrow.getFullYear(), (\"0\" + (tomorrow.getMonth()+1)).slice(-2), (\"0\" + tomorrow.getDate()).slice(-2)].join('-');\r",
									"pm.environment.set(\"due\", tomorrowString);\r",
									"pm.environment.set('Idempotency-Key-Create',pm.environment.get('agreementId') + (new Date()).getTime());\r",
									"\r",
									"\r",
									"pm.environment.set('merchantOrderId',pm.environment.get('merchantSerialNumber') + (new Date()).getTime());"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{Idempotency-Key-Create}}"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"amount\": {{amount_charge}},\r\n  \"description\": \"{{description_charge}}\",\r\n  \"due\": \"{{due}}\",\r\n  \"retryDays\": {{retryDays}},\r\n  \"transactionType\": \"DIRECT_CAPTURE\",\r\n  \"orderId\": \"{{merchantOrderId}}\"\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges"
							]
						},
						"description": "Creates a charge on the last relevant agreement.The idempotency-key is included to make sure you do not have additional draws."
					},
					"response": []
				},
				{
					"name": "Create Charge - Reserve capture",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"chargeId\", jsonData.chargeId);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var tomorrow = new Date();\r",
									"tomorrow.setDate(tomorrow.getDate() + 2);\r",
									"tomorrowString = [tomorrow.getFullYear(), (\"0\" + (tomorrow.getMonth()+1)).slice(-2), (\"0\" + tomorrow.getDate()).slice(-2)].join('-');\r",
									"pm.environment.set(\"due\", tomorrowString);\r",
									"pm.environment.set('Idempotency-Key-Create',pm.environment.get('agreementId') + (new Date()).getTime());\r",
									"\r",
									"pm.environment.set('merchantOrderId',pm.environment.get('merchantSerialNumber') + (new Date()).getTime());"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{Idempotency-Key-Create}}"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"amount\": {{amount_charge}},\r\n  \"description\": \"{{description_charge}}\",\r\n  \"due\": \"{{due}}\",\r\n  \"retryDays\": {{retryDays}},\r\n  \"transactionType\": \"RESERVE_CAPTURE\",\r\n  \"orderId\": \"{{merchantOrderId}}\"\r\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges"
							]
						},
						"description": "Creates a charge on the last relevant agreement.The idempotency-key is included to make sure you do not have additional draws."
					},
					"response": []
				},
				{
					"name": "Capture reserved charge",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{Idempotency-Key-Capture}}",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}",
								"type": "text"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"amount\": {{amount_charge}},\n  \"description\": \"{{description_charge}}\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges/{{chargeId}}/capture",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges",
								"{{chargeId}}",
								"capture"
							]
						}
					},
					"response": []
				},
				{
					"name": "Refund Charge",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"pm.environment.set('Idempotency-Key-Refund',pm.environment.get('agreementId') + (new Date()).getTime());"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{Idempotency-Key-Refund}}",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}",
								"type": "text"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"amount\": {{amount_refund}},\r\n  \"description\":\"{{description_refund}}\"\r\n}\r\n"
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges/{{chargeId}}/refund",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges",
								"{{chargeId}}",
								"refund"
							]
						}
					},
					"response": []
				},
				{
					"name": "Cancel Charge",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Idempotency-Key",
								"value": "{{idempotency_key}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges/{{chargeId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges",
								"{{chargeId}}"
							]
						},
						"description": "GET one agreement (script based on last created Agreement)"
					},
					"response": []
				},
				{
					"name": "Get Charge",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges/{{chargeId}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges",
								"{{chargeId}}"
							]
						},
						"description": "GET one agreement (script based on last created Agreement)"
					},
					"response": []
				},
				{
					"name": "List Charges",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.environment.set(\"continuation_token\", pm.response.headers.get(\"Continuation-Token\"));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}"
							},
							{
								"key": "Ocp-Apim-Subscription-Key",
								"value": "{{Ocp-Apim-Subscription-Key}}"
							},
							{
								"key": "Content-Type",
								"value": "Application/json"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							},
							{
								"key": "Continuation-Token",
								"value": "{{continuation_token}}",
								"type": "default",
								"disabled": true
							}
						],
						"url": {
							"raw": "{{base_url}}/recurring/v3/agreements/{{agreementId}}/charges",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"recurring",
								"v3",
								"agreements",
								"{{agreementId}}",
								"charges"
							],
							"query": [
								{
									"key": "status",
									"value": "{{status_charges}}",
									"disabled": true
								}
							]
						},
						"description": "Lists all charges for an agreement"
					},
					"response": []
				}
			]
		},
		{
			"name": "User Info",
			"item": [
				{
					"name": "Get Userinfo",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Merchant-Serial-Number",
								"value": "{{merchantSerialNumber}}"
							},
							{
								"key": "Vipps-System-Name",
								"value": "{{vipps_system_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Version",
								"value": "{{vipps_system_version}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Name",
								"value": "{{vipps_system_plugin_name}}",
								"type": "default"
							},
							{
								"key": "Vipps-System-Plugin-Version",
								"value": "{{vipps_system_plugin_version}}",
								"type": "default"
							}
						],
						"url": {
							"raw": "{{base_url}}/vipps-userinfo-api/userinfo/{{sub}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"vipps-userinfo-api",
								"userinfo",
								"{{sub}}"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}