{
	"info": {
		"_postman_id": "c1f6b1a2-b2d4-4f51-b856-11b11b1b1b1b",
		"name": "Payment Iegpay API",
		"description": "Koleksi Postman untuk menguji integrasi dengan Payment Gateway Iegpay. Saat ini sistem mendukung dua provider: Xendit & Midtrans. Gunakan mode TEST via /api-sandbox/v1 atau mode LIVE via /api/v1. Daftar payment_method: QRIS, BCA_VA, BNI_VA, BRIVA, MANDIRI_VA, OVO, DANA, GOPAY, SHOPEEPAY.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Buat Pembayaran",
			"item": [
				{
					"name": "Buat Pembayaran - Tanpa Metode (Checkout)",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{API_KEY}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"external_id\": \"INV-12345\",\n    \"customer_name\": \"Budi Santoso\",\n    \"customer_email\": \"budi@example.com\",\n    \"customer_phone\": \"081234567890\",\n    \"description\": \"Pembayaran Paket Premium\",\n    \"amount\": 100000\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/invoices",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"invoices"
							]
						}
					},
					"response": []
				},
				{
					"name": "Buat Pembayaran - QRIS",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{API_KEY}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"external_id\": \"INV-QRIS-001\",\n    \"customer_name\": \"Budi Santoso\",\n    \"customer_email\": \"budi@example.com\",\n    \"customer_phone\": \"081234567890\",\n    \"description\": \"Pembayaran QRIS\",\n    \"amount\": 25000,\n    \"payment_method\": \"QRIS\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/invoices",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"invoices"
							]
						}
					},
					"response": []
				},
				{
					"name": "Buat Pembayaran - BCA Virtual Account",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{API_KEY}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"external_id\": \"INV-VA-BCA-001\",\n    \"customer_name\": \"Budi Santoso\",\n    \"customer_email\": \"budi@example.com\",\n    \"customer_phone\": \"081234567890\",\n    \"description\": \"Pembayaran BCA Virtual Account\",\n    \"amount\": 150000,\n    \"payment_method\": \"BCA_VA\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/invoices",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"invoices"
							]
						}
					},
					"response": []
				},
				{
					"name": "Buat Pembayaran - E-Wallet (DANA)",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{API_KEY}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"external_id\": \"INV-EWALLET-DANA-001\",\n    \"customer_name\": \"Budi Santoso\",\n    \"customer_email\": \"budi@example.com\",\n    \"customer_phone\": \"081234567890\",\n    \"description\": \"Pembayaran DANA\",\n    \"amount\": 50000,\n    \"payment_method\": \"DANA\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/invoices",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"invoices"
							]
						}
					},
					"response": []
				},
				{
					"name": "Buat Pembayaran - Midtrans QRIS (opsional)",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{API_KEY}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"external_id\": \"INV-QRIS-MT-001\",\n    \"customer_name\": \"Budi Santoso\",\n    \"customer_email\": \"budi@example.com\",\n    \"customer_phone\": \"081234567890\",\n    \"description\": \"Pembayaran QRIS via Midtrans\",\n    \"amount\": 25000,\n    \"payment_method\": \"QRIS\",\n    \"provider\": \"midtrans\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/invoices",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"invoices"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Cek Status Pembayaran",
			"item": [
				{
					"name": "Cek Status Invoice",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{API_KEY}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/invoices/{{EXTERNAL_ID}}",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"invoices",
								"{{EXTERNAL_ID}}"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:8000/api-sandbox/v1"
		},
		{
			"key": "API_KEY",
			"value": "MASUKAN_API_KEY_ANDA_DI_SINI"
		},
		{
			"key": "EXTERNAL_ID",
			"value": "INV-12345"
		}
	]
}