75 lines
2.8 KiB
JSON
75 lines
2.8 KiB
JSON
{
|
|
"info": {
|
|
"name": "Payment Link QA",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"variable": [
|
|
{ "key": "baseUrl", "value": "http://localhost:8000" },
|
|
{ "key": "paymentLinkBase", "value": "http://localhost:5174/pay" },
|
|
{ "key": "externalApiKey", "value": "" },
|
|
{ "key": "token", "value": "" },
|
|
{ "key": "order_id", "value": "" }
|
|
],
|
|
"item": [
|
|
{
|
|
"name": "1) Create Transaction",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "X-API-KEY", "value": "{{externalApiKey}}" }
|
|
],
|
|
"url": { "raw": "{{baseUrl}}/createtransaksi", "host": ["{{baseUrl}}"], "path": ["createtransaksi"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"item_id\": \"order-demo-1\",\n \"nominal\": 150000,\n \"customer\": { \"name\": \"Demo User\", \"email\": \"demo@example.com\" },\n \"allowed_methods\": [\"bank_transfer\", \"credit_card\", \"gopay\", \"cstore\"]\n}"
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "2) Resolve Token",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": { "raw": "{{baseUrl}}/api/payment-links/{{token}}", "host": ["{{baseUrl}}"], "path": ["api","payment-links","{{token}}"] }
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "3) Charge - Bank Transfer (BCA)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [ { "key": "Content-Type", "value": "application/json" } ],
|
|
"url": { "raw": "{{baseUrl}}/api/payments/charge", "host": ["{{baseUrl}}"], "path": ["api","payments","charge"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"payment_type\": \"bank_transfer\",\n \"transaction_details\": { \"order_id\": \"{{order_id}}\", \"gross_amount\": 150000 },\n \"bank_transfer\": { \"bank\": \"bca\" }\n}"
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "3) Charge - CStore (Indomaret)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [ { "key": "Content-Type", "value": "application/json" } ],
|
|
"url": { "raw": "{{baseUrl}}/api/payments/charge", "host": ["{{baseUrl}}"], "path": ["api","payments","charge"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"payment_type\": \"cstore\",\n \"transaction_details\": { \"order_id\": \"{{order_id}}\", \"gross_amount\": 150000 },\n \"cstore\": { \"store\": \"indomaret\" }\n}"
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "4) Payment Status",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": { "raw": "{{baseUrl}}/api/payments/{{order_id}}/status", "host": ["{{baseUrl}}"], "path": ["api","payments","{{order_id}}","status"] }
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
} |