{
	"info": {
		"_postman_id": "8740d38e-0751-412c-94b0-6b23649f3b8c",
		"name": "PaymentsPlus API",
		"description": "Collection of PaymentsPlus API tests.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Api-Keys",
			"item": [
				{
					"name": "Get latest Api-Key",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/api-keys/latest",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"api-keys",
								"latest"
							]
						},
						"description": "The resource for getting and rolling forward api-keys."
					},
					"response": []
				}
			]
		},
		{
			"name": "Root",
			"item": [
				{
					"name": "Root",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								""
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Files",
			"item": [
				{
					"name": "Recent files",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files"
							]
						},
						"description": "The resource for getting recent files."
					},
					"response": []
				},
				{
					"name": "Payments within file",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments"
							]
						},
						"description": "The resource for getting payments within a file."
					},
					"response": []
				},
				{
					"name": "Payment details",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments/{{currentPaymentId}}",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments",
								"{{currentPaymentId}}"
							]
						},
						"description": "The resource for getting details of a payment within a file."
					},
					"response": []
				},
				{
					"name": "Upload file",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Prevent-CSRF",
								"value": "true"
							},
							{
								"key": "Content-Type",
								"value": "multipart/form-data;boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "file",
									"value": "",
									"type": "file"
								}
							]
						},
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/TEST_FILE_{{$timestamp}}/upload",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"TEST_FILE_{{$timestamp}}",
								"upload"
							]
						},
						"description": "The resource for uploading a file."
					},
					"response": []
				},
				{
					"name": "File Query For Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/for-status?status=COMPLETE",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"for-status"
							],
							"query": [
								{
									"key": "status",
									"value": "COMPLETE"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "File Query For Date",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/for-date?date=2018-08-01",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"for-date"
							],
							"query": [
								{
									"key": "date",
									"value": "2018-08-01"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "File Query For Filename",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/for-filename?filename=Raw File2.txt",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"for-filename"
							],
							"query": [
								{
									"key": "filename",
									"value": "Raw File2.txt"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Create File",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"fileName\": \"TEST_FILE_8984jdk9\",\n\t\"paymentDate\": \"2018-11-16\",\n\t\"referenceCode\": \"Test Reference\"\n}"
						},
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/TEST_FILE_{{$timestamp}}",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"TEST_FILE_{{$timestamp}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Cancel File",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/cancel",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"cancel"
							]
						}
					},
					"response": []
				},
				{
					"name": "Send File",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/send",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"send"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Payment - Direct Entry",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"lodgementReference\": \"ABC123\",\r\n\t\"paymentMethod\": \"DIRECT_ENTRY\",\r\n\t\"paymentAmount\": 100,\r\n\t\"paymentDate\": \"2018-08-01\",\r\n\t\"fundingAccount\": {\r\n\t\t\"bsbNumber\":\"032-999\",\r\n\t\t\"accountNumber\":\"999994\"\r\n\t},\r\n\t\"recipientAccount\": {\r\n\t\t\"type\": \"AU_DOMESTIC\",\r\n\t\t\"accountName\": \"Test\",\r\n\t\t\"accountNumber\": \"000008\",\r\n\t\t\"bsbNumber\": \"032-001\" \r\n\t},\r\n\t\"payeeName\": \"Payee\",\r\n\t\"currency\": \"AUD\"\r\n}\r\n"
						},
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments/TEST_PMT_{{$timestamp}}",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments",
								"TEST_PMT_{{$timestamp}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Payment - BPay",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"paymentMethod\": \"BPAY\",\r\n\t\"paymentAmount\": 100,\r\n\t\"paymentDate\": \"2018-08-01\",\r\n\t\"fundingAccount\": {\r\n\t\t\"bsbNumber\": \"032-999\",\r\n\t\t\"accountNumber\":\"999994\"\r\n\t},\r\n\t\"recipientAccount\": {\r\n\t\t\"type\": \"BPAY\",\r\n\t\t\"billerNumber\": \"12345\",\r\n\t\t\"crn\": \"123456789\"\r\n\t},\r\n\t\"payeeName\": \"Payee\",\r\n\t\"currency\": \"AUD\"\r\n}\r\n"
						},
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments/TEST_PMT_{{$timestamp}}",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments",
								"TEST_PMT_{{$timestamp}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Payment - AU OTT",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"lodgementReference\": \"ABC123\",\r\n\t\"paymentMethod\": \"AU_OTT\",\r\n\t\"paymentAmount\": 100,\r\n\t\"paymentDate\": \"2018-08-01\",\r\n\t\"fundingAccount\": {\r\n\t\t\"bsbNumber\": \"032-999\",\r\n\t\t\"accountNumber\":\"999994\"\r\n\t},\r\n\t\"recipientAccount\": {\r\n        \"type\": \"INTERNATIONAL\",\r\n\t\t\"accountName\": \"Mr Account\",\r\n\t\t\"iban\": \"123456\",\r\n\t\t\"currency\": \"AUD\",\r\n\t\t\"routingCode\": \"ABC123\",\r\n\t\t\"swiftCode\": \"WPACAU2FXX\"\r\n\t},\r\n\t\"payeeRegisteredAddress\": {\r\n\t\t\"street1\": \"1 Street St\",\r\n\t\t\"street2\": \"Place Plaza\",\r\n\t\t\"city\": \"Sydney\",\r\n\t\t\"state\": \"NSW\",\r\n\t\t\"postcode\": \"2000\",\r\n\t\t\"countryCode\": \"AU\"\t\r\n\t},\r\n\t\"payeeName\": \"Payee\",\r\n\t\"currency\": \"AUD\"\r\n}\r\n"
						},
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments/TEST_PMT_{{$timestamp}}",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments",
								"TEST_PMT_{{$timestamp}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Payment - RTGS",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n\t\"lodgementReference\": \"ABC123\",\r\n\t\"paymentMethod\": \"RTGS\",\r\n\t\"paymentAmount\": 100,\r\n\t\"paymentDate\": \"2018-08-01\",\r\n\t\"fundingAccount\": {\r\n\t\t\"bsbNumber\": \"032-999\",\r\n\t\t\"accountNumber\":\"999994\"\r\n\t},\r\n\t\"recipientAccount\": {\r\n\t\t\"type\": \"RTGS\",\r\n\t\t\"accountName\": \"Test\",\r\n\t\t\"accountNumber\": \"000008\",\r\n\t\t\"bsbNumber\": \"032-001\" \r\n\t},\r\n\t\"payeeName\": \"Payee\",\r\n\t\"currency\": \"AUD\"\r\n}\r\n"
						},
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments/TEST_PMT_{{$timestamp}}",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments",
								"TEST_PMT_{{$timestamp}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Cancel Payment",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/files/{{currentFileId}}/payments/{{currentPaymentId}}/cancel",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"files",
								"{{currentFileId}}",
								"payments",
								"{{currentPaymentId}}",
								"cancel"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Methods",
			"item": [
				{
					"name": "List Buyer Instruments",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/methods",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"methods"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Payments",
			"item": [
				{
					"name": "Payment Query For Date",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/payments/for-date?date=2018-05-24",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"payments",
								"for-date"
							],
							"query": [
								{
									"key": "date",
									"value": "2018-05-24"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Payment Query For Reference",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/payments/for-reference?reference=ABC123",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"payments",
								"for-reference"
							],
							"query": [
								{
									"key": "reference",
									"value": "ABC123"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Pending Payments",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/payments/pending",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"payments",
								"pending"
							]
						}
					},
					"response": []
				},
				{
					"name": "Returned Payments",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/payments/returns",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"payments",
								"returns"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Accounts",
			"item": [
				{
					"name": "Get AU Settlement Account",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/accounts/032999-999994",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"accounts",
								"032922-108647"
							]
						}
					},
					"response": []
				},
				{
					"name": "List Buyer Accounts",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environmentURL}}/rest/v1/accounts",
							"protocol": "https",
							"host": [
								"{{environmentURL}}"
							],
							"path": [
								"rest",
								"v1",
								"accounts"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"auth": {
		"type": "basic",
		"basic": [
			{
				"key": "username",
				"value": "{{apiKey}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"id": "9c8d26e9-ef8d-4642-95f2-3a0feb24c889",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"id": "fe4cede6-3402-49c9-bcc9-62b620fe91f8",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}
