{
    "info": {
        "name": "PSD Testing",
        "description": "",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Security",
            "description": "",
            "item": [
                {
                    "name": "Access Token B2B",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();\r",
                                    "\r",
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "    pm.environment.set(\"b2b_token\", jsonData.accessToken);\r",
                                    "    // pm.environment.set(\"b2b_token\", 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5OGE3MTNlZC0zYmM4LTRlZDctYmVkMi0yN2ZiM2VmNmI5MDQiLCJqdGkiOiI5MWY1MDQ2YTYwNDQ5ZjRiYzBhZjZlNWQxODFjMDk4ZmYyNzVmMDQ3NGEyOWY0NGFmMjA2N2VjNmI5N2MzNTVlMGNlMjFkZTZlNWFkMzg3YiIsImlhdCI6MTY4MDU5ODA3NC40NDU0MjEsIm5iZiI6MTY4MDU5ODA3NC40NDU0MjYsImV4cCI6MTY4MDU5ODk3NC40MzU2OTYsInN1YiI6IiIsInNjb3BlcyI6WyJ0cmFuc2Zlci12YSJdfQ.jHiZhPr8Y6rd4WuX2FOk2hIeyLSwZHT3hqhRfDxDk6Ev_iVNCAR0JMAaOaVACRPuEDyGz8zh8-JlOF4OSVW5D5UmQRz06dBBysP9vx2uMYHkBJ7_zMui4LZIsMGB5kheDgziYfy7T3YWz2TM72BMIQ1ua29psLaJXYjjVCANah0_j1OZCgTrEdhIW4ngDVJRFjyCbFMKVmuFwIo28JJicxY_XXQzXqZeGs33iSQrd1TxwpzPC2tncSUqL7sJCDZh-4ZXgN1lRI1WkZ04bdtKaehjIPVy8-Wq0CSFhJeHYYcnHkRNLpE0Wy4DwVA2eY2zF1_zqLa0Zcym5wRAwBCZHfYliw0i-ptcccg0wXdHlSYRXHNL6P2rJDEpszwZWDAHECJQKLEiHa5-rzxgyruhHaE5O3ls_ue-rwxfVYNolspeNvFR7yn3zHFzoQrj7NwsNCTu0XfVvV_JsBgaJvYjw_XgeRJ4_ou4nN2u5eRARgbYXMvZgXXMvSTCpWmO6-VefD7o0pA25xnJO3oVcKpMkmA5tOvgHO2shdIVPdyke5m_ry-XRF-67Irh_dSAcLbKiFdMMo_b0OrbM9q_KeVcecQnSJ2UaEU_4m0gznjmMi6kradTVCW18TcyEDY9g2ygONP0hSuvnfyqoCTjXL4VPvYbN6DUKBKg3iH6JO-Bxls');\r",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {},
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"grantType\": \"client_credentials\"\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_auth}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "CHANNEL-ID",
                                "value": "{{channel}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/snap/oauth/v1.0/access-token/b2b",
                            "path": [
                                "pg",
                                "snap",
                                "oauth",
                                "v1.0",
                                "access-token",
                                "b2b"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_auth}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "CHANNEL-ID",
                                        "value": "{{channel}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/snap/oauth/v1.0/access-token/b2b",
                                    "path": [
                                        "pg",
                                        "snap",
                                        "oauth",
                                        "v1.0",
                                        "access-token",
                                        "b2b"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"grantType\": \"client_credentials\"\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                }
            ],
            "event": [
                {
                    "listen": "prerequest",
                    "script": {
                        "exec": [
                            "eval(pm.environment.get('pmlib_code'))",
                            "",
                            "const moment = require('moment')",
                            "const clientID = pm.environment.get(\"client_id\")",
                            "let privateKey = pm.environment.get(\"private_key\")",
                            "const timestamp = moment().utc().format(\"YYYY-MM-DDThh:mm:ssZ\")",
                            "const stringToSign = `${clientID}|${timestamp}`",
                            "",
                            "console.log(\"clientID: \" + clientID)",
                            "console.log(\"privateKey: \" + privateKey)",
                            "console.log(\"timestamp: \" + timestamp)",
                            "console.log(\"stringToSign: \" + stringToSign)",
                            "",
                            "const sig = new pmlib.rs.KJUR.crypto.Signature({\"alg\": \"SHA256withRSA\"})",
                            "privateKey = pmlib.rs.KEYUTIL.getKey(privateKey)",
                            "sig.init(privateKey)",
                            "const hash = sig.signString(stringToSign)",
                            "const signatureAuth = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(hash));",
                            "",
                            "console.log(\"signatureAuth: \" + signatureAuth)",
                            "",
                            "pm.environment.set(\"timestamp\", timestamp)",
                            "pm.environment.set(\"signature_auth\", signatureAuth)"
                        ],
                        "type": "text/javascript",
                        "packages": {}
                    }
                },
                {
                    "listen": "test",
                    "script": {
                        "exec": [
                            ""
                        ],
                        "type": "text/javascript",
                        "packages": {}
                    }
                }
            ],
            "auth": {}
        },
        {
            "name": "QRIS Symetric",
            "description": "",
            "item": [
                {
                    "name": "Generate QRIS",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{b2b_token}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"partnerReferenceNo\":\"202411111021\",\r\n    \"amount\": {\r\n        \"value\": \"1000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-11-21T17:59:00+07:00\",\r\n    \"additionalInfo\": {\r\n        \"tipsIndikator\": \"00\",\r\n        \"tipsFixamount\": \"0\",\r\n        \"tipsPercentage\": \"0\",\r\n        \"note\": \"QR test\",\r\n        \"qrType\": \"12\",\r\n        \"callbackUrl\": \"https://devo.finnet.co.id/pg/middleware/api/callback\" \r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_secret}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "CHANNEL-ID",
                                "value": "{{channel}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-generate",
                            "path": [
                                "pg",
                                "payment",
                                "card",
                                "v1.0",
                                "qr",
                                "qr-mpm-generate"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": true
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_secret}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "CHANNEL-ID",
                                        "value": "{{channel}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-generate",
                                    "path": [
                                        "pg",
                                        "payment",
                                        "card",
                                        "v1.0",
                                        "qr",
                                        "qr-mpm-generate"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"partnerReferenceNo\":\"202411111021\",\r\n    \"amount\": {\r\n        \"value\": \"1000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-11-21T17:59:00+07:00\",\r\n    \"additionalInfo\": {\r\n        \"tipsIndikator\": \"00\",\r\n        \"tipsFixamount\": \"0\",\r\n        \"tipsPercentage\": \"0\",\r\n        \"note\": \"QR test\",\r\n        \"qrType\": \"12\",\r\n        \"callbackUrl\": \"https://devo.finnet.co.id/pg/middleware/api/callback\" \r\n    }\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                },
                {
                    "name": "Cek Status",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{b2b_token}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180711\",\r\n    \"originalReferenceNo\": \"202407180711\",\r\n    \"serviceCode\": \"47\",\r\n    \"amount\": {\r\n        \"value\": \"11000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\"\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_secret}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "CHANNEL-ID",
                                "value": "{{channel}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-query",
                            "path": [
                                "pg",
                                "payment",
                                "card",
                                "v1.0",
                                "qr",
                                "qr-mpm-query"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": true
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_secret}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "CHANNEL-ID",
                                        "value": "{{channel}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-query",
                                    "path": [
                                        "pg",
                                        "payment",
                                        "card",
                                        "v1.0",
                                        "qr",
                                        "qr-mpm-query"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180711\",\r\n    \"originalReferenceNo\": \"202407180711\",\r\n    \"serviceCode\": \"47\",\r\n    \"amount\": {\r\n        \"value\": \"11000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\"\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                },
                {
                    "name": "Refund",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{b2b_token}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180711\",\r\n    \"originalReferenceNo\":\"202407180711\",\r\n    \"partnerRefundNo\":\"202407180711\",\r\n    \"refundAmount\": {\r\n        \"value\": \"107.00\",\r\n        \"currency\": \"IDR\"\r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_secret}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "CHANNEL-ID",
                                "value": "{{channel}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-refund",
                            "path": [
                                "pg",
                                "payment",
                                "card",
                                "v1.0",
                                "qr",
                                "qr-mpm-refund"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": true
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_secret}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "CHANNEL-ID",
                                        "value": "{{channel}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-refund",
                                    "path": [
                                        "pg",
                                        "payment",
                                        "card",
                                        "v1.0",
                                        "qr",
                                        "qr-mpm-refund"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180711\",\r\n    \"originalReferenceNo\":\"202407180711\",\r\n    \"partnerRefundNo\":\"202407180711\",\r\n    \"refundAmount\": {\r\n        \"value\": \"107.00\",\r\n        \"currency\": \"IDR\"\r\n    }\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                },
                {
                    "name": "Health",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{b2b2c_token}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "method": "GET",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"amount\": {\r\n        \"value\": \"101.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"FM2103300001\",\r\n    \"subMerchantId\": \"FM2103300001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-06-19T14:00:00-07:00\",\r\n    \"additionalInfo\": {\r\n        \"tips_indikator\": \"00\",\r\n        \"tips_fixamount\": \"0\",\r\n        \"note\": \"Bayar test\",\r\n        \"qr_type\": \"12\"\r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "http://127.0.0.1:8000/health",
                            "path": [
                                "health"
                            ],
                            "host": [
                                "127",
                                "0",
                                "0",
                                "1"
                            ],
                            "protocol": "http",
                            "port": "8000",
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "http://127.0.0.1:8000/health",
                                    "path": [
                                        "health"
                                    ],
                                    "host": [
                                        "127",
                                        "0",
                                        "0",
                                        "1"
                                    ],
                                    "protocol": "http",
                                    "port": "8000",
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"amount\": {\r\n        \"value\": \"101.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"FM2103300001\",\r\n    \"subMerchantId\": \"FM2103300001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-06-19T14:00:00-07:00\",\r\n    \"additionalInfo\": {\r\n        \"tips_indikator\": \"00\",\r\n        \"tips_fixamount\": \"0\",\r\n        \"note\": \"Bayar test\",\r\n        \"qr_type\": \"12\"\r\n    }\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                }
            ],
            "event": [
                {
                    "listen": "prerequest",
                    "script": {
                        "exec": [
                            "eval(pm.environment.get('pmlib_code'))",
                            "",
                            "const moment = require('moment')",
                            "",
                            "const accessToken = pm.environment.get(\"b2b_token\")",
                            "const timestamp = moment().utc().format(\"YYYY-MM-DDThh:mm:ssZ\")",
                            "const body = pm.request.body.raw",
                            "const fullPath = pm.request.url.getPathWithQuery()",
                            "const method = pm.request.method",
                            "const minifiedBody = JSON.stringify(JSON.parse(body))",
                            "const secretKey = pm.environment.get(\"client_secret\")",
                            "let privateKey = pm.environment.get(\"private_key\")",
                            "",
                            "const sig = new pmlib.rs.KJUR.crypto.Signature({\"alg\": \"SHA256withRSA\"})",
                            "privateKey = pmlib.rs.KEYUTIL.getKey(privateKey)",
                            "sig.init(privateKey)",
                            "",
                            "console.log(\"accessToken: \" + accessToken)",
                            "console.log(\"timestamp: \" + timestamp)",
                            "console.log(\"body: \" + body)",
                            "console.log(\"minified body: \" + minifiedBody)",
                            "console.log(\"fullPath: \" + fullPath)",
                            "console.log(\"method: \" + method)",
                            "console.log(\"secretKey: \" + secretKey)",
                            "",
                            "const hashedBody = CryptoJS.SHA256(minifiedBody).toString().toLowerCase()",
                            "",
                            "console.log(\"hashedBody: \" + hashedBody)",
                            "",
                            "const stringToSign = `${method}:${fullPath}:${accessToken}:${hashedBody}:${timestamp}`",
                            "const stringToSignWithoutAccessToken = `${method}:${fullPath}:${hashedBody}:${timestamp}`",
                            "",
                            "const hashAsym = sig.signString(stringToSignWithoutAccessToken)",
                            "",
                            "",
                            "console.log(\"stringToSign: \" + stringToSign)",
                            "console.log(\"stringToSignWithoutAccessToken: \" + stringToSignWithoutAccessToken)",
                            "",
                            "const hash = CryptoJS.HmacSHA512(stringToSign, secretKey).toString()",
                            "console.log(\"hash HmacSHA512: \" + hash)",
                            "const signature = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(hash));",
                            "const signatureWithoutAccessToken = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(hashAsym));",
                            "",
                            "console.log(\"signature: \" + signature)",
                            "console.log(\"signatureWithoutAccessToken: \" + signatureWithoutAccessToken)",
                            "",
                            "pm.environment.set(\"external_id\", require(\"uuid\").v4())",
                            "pm.environment.set(\"timestamp\", timestamp)",
                            "pm.environment.set(\"signature_service\", signature)",
                            "//pm.environment.set(\"signature_service\", signatureWithoutAccessToken)"
                        ],
                        "type": "text/javascript",
                        "packages": {}
                    }
                },
                {
                    "listen": "test",
                    "script": {
                        "exec": [
                            ""
                        ],
                        "type": "text/javascript",
                        "packages": {}
                    }
                }
            ],
            "auth": {}
        },
        {
            "name": "QRIS Asymetric Without Token",
            "description": "",
            "item": [
                {
                    "name": "Generate QRIS",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "noauth",
                            "noauth": []
                        },
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"partnerReferenceNo\":\"202411110005\",\r\n    \"amount\": {\r\n        \"value\": \"1000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-11-26T17:54:00-07:00\",\r\n    \"additionalInfo\": {\r\n        \"tipsIndikator\": \"00\",\r\n        \"tipsFixamount\": \"0\",\r\n        \"tipsPercentage\": \"0\",\r\n        \"note\": \"QR test\",\r\n        \"qrType\": \"12\",\r\n        \"callbackUrl\": \"https://devo.finnet.co.id/pg/middleware/api/callback\" \r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_secret}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "CHANNEL-ID",
                                "value": "{{channel}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-generate",
                            "path": [
                                "pg",
                                "payment",
                                "card",
                                "v1.0",
                                "qr",
                                "qr-mpm-generate"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": true
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_secret}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "CHANNEL-ID",
                                        "value": "{{channel}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-generate",
                                    "path": [
                                        "pg",
                                        "payment",
                                        "card",
                                        "v1.0",
                                        "qr",
                                        "qr-mpm-generate"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"partnerReferenceNo\":\"202411110005\",\r\n    \"amount\": {\r\n        \"value\": \"1000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-11-26T17:54:00-07:00\",\r\n    \"additionalInfo\": {\r\n        \"tipsIndikator\": \"00\",\r\n        \"tipsFixamount\": \"0\",\r\n        \"tipsPercentage\": \"0\",\r\n        \"note\": \"QR test\",\r\n        \"qrType\": \"12\",\r\n        \"callbackUrl\": \"https://devo.finnet.co.id/pg/middleware/api/callback\" \r\n    }\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                },
                {
                    "name": "Cek Status",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "noauth",
                            "noauth": []
                        },
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180712\",\r\n    \"originalReferenceNo\": \"202407180712\",\r\n    \"serviceCode\": \"47\",\r\n    \"amount\": {\r\n        \"value\": \"11000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\"\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_secret}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-query",
                            "path": [
                                "pg",
                                "payment",
                                "card",
                                "v1.0",
                                "qr",
                                "qr-mpm-query"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": true
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_secret}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-query",
                                    "path": [
                                        "pg",
                                        "payment",
                                        "card",
                                        "v1.0",
                                        "qr",
                                        "qr-mpm-query"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180712\",\r\n    \"originalReferenceNo\": \"202407180712\",\r\n    \"serviceCode\": \"47\",\r\n    \"amount\": {\r\n        \"value\": \"11000.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"KAI001\",\r\n    \"subMerchantId\": \"KAI001\"\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                },
                {
                    "name": "Refund GCP",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "noauth",
                            "noauth": []
                        },
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180713\",\r\n    \"originalReferenceNo\":\"202407180713\",\r\n    \"partnerRefundNo\":\"202407180713\",\r\n    \"refundAmount\": {\r\n        \"value\": \"113.00\",\r\n        \"currency\": \"IDR\"\r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-CLIENT-KEY",
                                "value": "{{client_secret}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "CHANNEL-ID",
                                "value": "{{channel}}",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-refund",
                            "path": [
                                "pg",
                                "payment",
                                "card",
                                "v1.0",
                                "qr",
                                "qr-mpm-refund"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": true
                                    },
                                    {
                                        "key": "X-CLIENT-KEY",
                                        "value": "{{client_secret}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "CHANNEL-ID",
                                        "value": "{{channel}}",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/pg/payment/card/v1.0/qr/qr-mpm-refund",
                                    "path": [
                                        "pg",
                                        "payment",
                                        "card",
                                        "v1.0",
                                        "qr",
                                        "qr-mpm-refund"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"originalPartnerReferenceNo\":\"202407180713\",\r\n    \"originalReferenceNo\":\"202407180713\",\r\n    \"partnerRefundNo\":\"202407180713\",\r\n    \"refundAmount\": {\r\n        \"value\": \"113.00\",\r\n        \"currency\": \"IDR\"\r\n    }\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                },
                {
                    "name": "Health",
                    "description": "",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "const jsonData = pm.response.json();",
                                    "",
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "auth": {},
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{b2b2c_token}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "method": "GET",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"amount\": {\r\n        \"value\": \"101.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"FM2103300001\",\r\n    \"subMerchantId\": \"FM2103300001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-06-19T14:00:00-07:00\",\r\n    \"additionalInfo\": {\r\n        \"tips_indikator\": \"00\",\r\n        \"tips_fixamount\": \"0\",\r\n        \"note\": \"Bayar test\",\r\n        \"qr_type\": \"12\"\r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "header": [
                            {
                                "key": "X-TIMESTAMP",
                                "value": "{{timestamp}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-PARTNER-ID",
                                "value": "{{client_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-SIGNATURE",
                                "value": "{{signature_service}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-EXTERNAL-ID",
                                "value": "{{external_id}}",
                                "description": "",
                                "type": "string"
                            },
                            {
                                "key": "X-Scopes",
                                "value": "qr-payment,47",
                                "description": "",
                                "type": "string"
                            }
                        ],
                        "url": {
                            "raw": "http://127.0.0.1:8000/health",
                            "path": [
                                "health"
                            ],
                            "host": [
                                "127",
                                "0",
                                "0",
                                "1"
                            ],
                            "protocol": "http",
                            "port": "8000",
                            "query": [],
                            "variable": []
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "X-TIMESTAMP",
                                        "value": "{{timestamp}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-PARTNER-ID",
                                        "value": "{{client_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-SIGNATURE",
                                        "value": "{{signature_service}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-EXTERNAL-ID",
                                        "value": "{{external_id}}",
                                        "description": "",
                                        "disabled": false
                                    },
                                    {
                                        "key": "X-Scopes",
                                        "value": "qr-payment,47",
                                        "description": "",
                                        "disabled": false
                                    }
                                ],
                                "url": {
                                    "raw": "http://127.0.0.1:8000/health",
                                    "path": [
                                        "health"
                                    ],
                                    "host": [
                                        "127",
                                        "0",
                                        "0",
                                        "1"
                                    ],
                                    "protocol": "http",
                                    "port": "8000",
                                    "query": [],
                                    "variable": []
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"amount\": {\r\n        \"value\": \"101.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"feeAmount\": {\r\n        \"value\": \"0.00\",\r\n        \"currency\": \"IDR\"\r\n    },\r\n    \"merchantId\": \"FM2103300001\",\r\n    \"subMerchantId\": \"FM2103300001\",\r\n    \"terminalId\": \"213141251124\",\r\n    \"validityPeriod\": \"2024-06-19T14:00:00-07:00\",\r\n    \"additionalInfo\": {\r\n        \"tips_indikator\": \"00\",\r\n        \"tips_fixamount\": \"0\",\r\n        \"note\": \"Bayar test\",\r\n        \"qr_type\": \"12\"\r\n    }\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "cookie": []
                        }
                    ],
                    "protocolProfileBehavior": {
                        "strictSSL": false,
                        "followRedirects": true
                    }
                }
            ],
            "event": [
                {
                    "listen": "prerequest",
                    "script": {
                        "exec": [
                            "eval(pm.environment.get('pmlib_code'))",
                            "",
                            "const moment = require('moment')",
                            "",
                            "const accessToken = pm.environment.get(\"b2b_token\")",
                            "const timestamp = moment().utc().format(\"YYYY-MM-DDThh:mm:ssZ\")",
                            "const body = pm.request.body.raw",
                            "const fullPath = pm.request.url.getPathWithQuery()",
                            "const method = pm.request.method",
                            "const minifiedBody = JSON.stringify(JSON.parse(body))",
                            "const secretKey = pm.environment.get(\"client_secret\")",
                            "let privateKey = pm.environment.get(\"private_key\")",
                            "",
                            "const sig = new pmlib.rs.KJUR.crypto.Signature({\"alg\": \"SHA256withRSA\"})",
                            "privateKey = pmlib.rs.KEYUTIL.getKey(privateKey)",
                            "sig.init(privateKey)",
                            "",
                            "console.log(\"accessToken: \" + accessToken)",
                            "console.log(\"timestamp: \" + timestamp)",
                            "console.log(\"body: \" + body)",
                            "console.log(\"minified body: \" + minifiedBody)",
                            "console.log(\"fullPath: \" + fullPath)",
                            "console.log(\"method: \" + method)",
                            "console.log(\"secretKey: \" + secretKey)",
                            "",
                            "const hashedBody = CryptoJS.SHA256(minifiedBody).toString().toLowerCase()",
                            "",
                            "console.log(\"hashedBody: \" + hashedBody)",
                            "",
                            "const stringToSign = `${method}:${fullPath}:${accessToken}:${hashedBody}:${timestamp}`",
                            "const stringToSignWithoutAccessToken = `${method}:${fullPath}:${hashedBody}:${timestamp}`",
                            "",
                            "const hashAsym = sig.signString(stringToSignWithoutAccessToken)",
                            "",
                            "",
                            "console.log(\"stringToSign: \" + stringToSign)",
                            "console.log(\"stringToSignWithoutAccessToken: \" + stringToSignWithoutAccessToken)",
                            "",
                            "const hash = CryptoJS.HmacSHA512(stringToSign, secretKey).toString()",
                            "console.log(\"hash HmacSHA512: \" + hash)",
                            "const signature = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(hash));",
                            "const signatureWithoutAccessToken = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(hashAsym));",
                            "",
                            "console.log(\"signature: \" + signature)",
                            "console.log(\"signatureWithoutAccessToken: \" + signatureWithoutAccessToken)",
                            "",
                            "pm.environment.set(\"external_id\", require(\"uuid\").v4())",
                            "pm.environment.set(\"timestamp\", timestamp)",
                            "//pm.environment.set(\"signature_service\", signature)",
                            "pm.environment.set(\"signature_service\", signatureWithoutAccessToken)"
                        ],
                        "type": "text/javascript",
                        "packages": {}
                    }
                },
                {
                    "listen": "test",
                    "script": {
                        "exec": [
                            ""
                        ],
                        "type": "text/javascript",
                        "packages": {}
                    }
                }
            ],
            "auth": {}
        }
    ],
    "variable": [],
    "event": [],
    "auth": {}
}