{
    "info": {
        "name": "PAYWISE API",
        "description": "Set apiKey to your sandbox key (pw_test_…) to try it safely. Documentation: https://paywise.asia/developers/docs",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{apiKey}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://paywise.asia/api/v1"
        },
        {
            "key": "apiKey",
            "value": "pw_test_your_key_here"
        },
        {
            "key": "reference",
            "value": "PW…"
        },
        {
            "key": "withdrawalReference",
            "value": "PWD…"
        }
    ],
    "item": [
        {
            "name": "Create a QRIS transaction",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/transactions",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "transactions"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"merchant_reference\": \"ORDER-1042\",\n    \"amount\": 25000,\n    \"payment_method\": \"QRIS\",\n    \"customer_id\": \"user-1042\",\n    \"customer_name\": \"Budi Santoso\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Create a USDT transaction",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/transactions",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "transactions"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"merchant_reference\": \"ORDER-1043\",\n    \"amount\": 10,\n    \"payment_method\": \"USDT\",\n    \"network\": \"BEP20\",\n    \"customer_id\": \"user-1043\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Retrieve a transaction",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{baseUrl}}/transactions/{{reference}}",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "transactions",
                        "{{reference}}"
                    ]
                }
            }
        },
        {
            "name": "List transactions",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{baseUrl}}/transactions?status=paid&per_page=20",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "transactions"
                    ],
                    "query": [
                        {
                            "key": "status",
                            "value": "paid"
                        },
                        {
                            "key": "per_page",
                            "value": "20"
                        }
                    ]
                }
            }
        },
        {
            "name": "Request a QRIS withdrawal (live key)",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    },
                    {
                        "key": "Idempotency-Key",
                        "value": "{{$guid}}"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/withdrawals",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "withdrawals"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"payment_method\": \"QRIS\",\n    \"amount\": 100000,\n    \"bank_code\": \"014\",\n    \"account_number\": \"1234567890\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Request a USDT withdrawal (live key)",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    },
                    {
                        "key": "Idempotency-Key",
                        "value": "{{$guid}}"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/withdrawals",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "withdrawals"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"payment_method\": \"USDT\",\n    \"amount\": 50,\n    \"wallet_address\": \"0xabababababababababababababababababababab\",\n    \"network\": \"BEP20\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Retrieve a withdrawal",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{baseUrl}}/withdrawals/{{withdrawalReference}}",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "withdrawals",
                        "{{withdrawalReference}}"
                    ]
                }
            }
        },
        {
            "name": "List withdrawals",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{baseUrl}}/withdrawals?status=completed&per_page=20",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "withdrawals"
                    ],
                    "query": [
                        {
                            "key": "status",
                            "value": "completed"
                        },
                        {
                            "key": "per_page",
                            "value": "20"
                        }
                    ]
                }
            }
        },
        {
            "name": "Balance",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{baseUrl}}/balance",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "balance"
                    ]
                }
            }
        }
    ]
}