{
    "info": {
        "_postman_id": "efadeb2d-7e0b-571e-b671-fd48e213af46",
        "name": "Airtime Merchant API (v2.6)",
        "description": "Merchant integration API of the Airtime platform (`/api/v2/*`).\n\nChangelog: category codes and names are English (`pulsa` -> `phone_credit`, `paketdata` -> `mobile_data`, `voucher` -> `gift_card`, `utility` -> `bill_payment`, ...), and so are the category tokens of catalogue operator and product codes (`PH_SMART_PLS` -> `PH_SMART_CREDIT`, `VCR` -> `GIFT`, `UTL` -> `BILL`). The old codes are still accepted in every filter.\n\n\nFull reference: https://airtime.mobi/api-docs/v2.6",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Balance",
            "item": [
                {
                    "name": "Check wallet balance",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/wallets",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "wallets"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": ""
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Catalogue",
            "item": [
                {
                    "name": "List product categories",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/categories",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "categories"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Categories enabled for the merchant, ordered by assignment date. Not paginated; `data` is an array."
                    },
                    "response": []
                },
                {
                    "name": "List operators",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/operators",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "operators"
                            ],
                            "query": [
                                {
                                    "key": "category",
                                    "value": "",
                                    "description": "Category code (value of `code` from `/categories`): letters, digits and underscores. The pre-English codes (`pulsa`, `paketdata`, `voucher`, `utility`, ...) are still accepted.",
                                    "disabled": true
                                },
                                {
                                    "key": "country_code",
                                    "value": "",
                                    "description": "ISO two-letter destination country code. `ID` also matches operators with no country set.",
                                    "disabled": true
                                },
                                {
                                    "key": "sort_by",
                                    "value": "",
                                    "description": "Sort field. Any other value returns an error. Default is operator name.",
                                    "disabled": true
                                },
                                {
                                    "key": "sort_type",
                                    "value": "",
                                    "description": "Sort direction. Default `asc`.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number, default 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "10",
                                    "description": "Rows per page, default 10.",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Operators (product groups) enabled for the merchant, optionally filtered by category and destination country."
                    },
                    "response": []
                },
                {
                    "name": "List destination countries per category",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/operators/countries",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "operators",
                                "countries"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Pairs of (category, destination country) with the number of operators, so a UI can build country pickers without downloading every operator. A blank country is reported as `ID`. Not paginated."
                    },
                    "response": []
                },
                {
                    "name": "List products",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/products",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "products"
                            ],
                            "query": [
                                {
                                    "key": "operator",
                                    "value": "",
                                    "description": "Operator code filter (case-insensitive substring match on `group_code`). Letters, digits, underscore and space only.",
                                    "disabled": true
                                },
                                {
                                    "key": "category",
                                    "value": "",
                                    "description": "Category code filter (case-insensitive substring match on the category code, e.g. `phone_credit`): letters, digits and underscores. The pre-English codes are still accepted.",
                                    "disabled": true
                                },
                                {
                                    "key": "product_code",
                                    "value": "",
                                    "description": "Exact product code. Letters, digits and underscore only.",
                                    "disabled": true
                                },
                                {
                                    "key": "product_id",
                                    "value": "",
                                    "description": "Exact product id.",
                                    "disabled": true
                                },
                                {
                                    "key": "status",
                                    "value": "",
                                    "description": "Filter on the product status for your account (true or false).",
                                    "disabled": true
                                },
                                {
                                    "key": "sort_by",
                                    "value": "",
                                    "description": "Sort field. Any other value returns an error.",
                                    "disabled": true
                                },
                                {
                                    "key": "sort_type",
                                    "value": "",
                                    "description": "Sort direction. Default `asc`.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number, default 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "10",
                                    "description": "Rows per page, default 10.",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Products enabled for the merchant. `sales_price` and `promo_price` are in the\nmerchant currency named by `currency` (see Getting started, Money and currency).\nA zero price is returned as `null`.\n\nUse the returned `product_id` in `POST /transaction/request`.\n"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Transactions",
            "item": [
                {
                    "name": "Create a transaction",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/transaction/request",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "transaction",
                                "request"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Creates a transaction and charges the wallet. The response status is\n`PENDING`; the final status arrives by callback or via\n`/transaction/status`.\n\nIdempotency: if `reference_id` was already used by this API key, the\nexisting transaction is returned (HTTP 200) and nothing new is created.\n\nAdditional validation by product type: open-amount e-wallet products\nneed `amount`; game and some voucher products validate\n`additional_params` against the operator inputs (see `inputs` from\n`/operators`); property-tax (PBB) products need `inquiry_no`.\n",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"product_id\": 30971,\n    \"customer_number\": \"085207337683\",\n    \"reference_id\": \"TESTREF00018\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Inquiry (bill check)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/transaction/inquiry",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "transaction",
                                "inquiry"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Checks a bill or customer before payment for products that support it\n(for example PLN postpaid, PDAM, PBB, some e-wallets). The result is cached\nbriefly; if the cached inquiry expires before the transaction request\nyou get code `2013` and must inquire again. Products that do not support\ninquiry return a 400 or code `2007`. The content of `additional_data`\ndiffers per product.\n\nRequires a positive wallet balance, otherwise code `1002`.\n",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"product_id\": 1417,\n    \"customer_number\": \"512345678901\",\n    \"reference_id\": \"INQREF0001\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Transaction status",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/transaction/status?reference_id=",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "transaction",
                                "status"
                            ],
                            "query": [
                                {
                                    "key": "reference_id",
                                    "value": "",
                                    "description": "(Required) Your reference id of the transaction.",
                                    "disabled": false
                                },
                                {
                                    "key": "dev",
                                    "value": "",
                                    "description": "Staging only. 1 success, 2 failed, 3 pending. Ignored on production.",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Returns the current status of one of your transactions by your\n`reference_id`. `GET` is the usual method; `POST` with the same query\nparameters is also accepted.\n\nIf the transaction is unknown the response is code `3000` (HTTP 500).\n\n`dev` (staging only): simulates a final status for the transaction. `1`\nreturns `SUCCESS` with a generated serial number, `2` returns `FAILED`,\n`3` returns `PENDING`. It is ignored on production.\n"
                    },
                    "response": []
                },
                {
                    "name": "Transaction status (POST)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/transaction/status?reference_id=",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "transaction",
                                "status"
                            ],
                            "query": [
                                {
                                    "key": "reference_id",
                                    "value": "",
                                    "description": "(Required)",
                                    "disabled": false
                                },
                                {
                                    "key": "dev",
                                    "value": "",
                                    "description": "",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Same handler and parameters as `GET /api/v2/transaction/status` (the route accepts any method). Parameters are read from the query string."
                    },
                    "response": []
                },
                {
                    "name": "Transaction history",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/transaction/history",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "transaction",
                                "history"
                            ],
                            "query": [
                                {
                                    "key": "transaction_id",
                                    "value": "",
                                    "description": "Airtime transaction id (max 20 characters).",
                                    "disabled": true
                                },
                                {
                                    "key": "serial_number",
                                    "value": "",
                                    "description": "Serial number, alphanumeric only.",
                                    "disabled": true
                                },
                                {
                                    "key": "customer_number",
                                    "value": "",
                                    "description": "Customer number, digits only.",
                                    "disabled": true
                                },
                                {
                                    "key": "status",
                                    "value": "",
                                    "description": "Status filter. Must be lowercase.",
                                    "disabled": true
                                },
                                {
                                    "key": "from_date",
                                    "value": "",
                                    "description": "Start date `YYYY-MM-DD`. Applied only together with `to_date` (00:00:00 inclusive).",
                                    "disabled": true
                                },
                                {
                                    "key": "to_date",
                                    "value": "",
                                    "description": "End date `YYYY-MM-DD` (23:59:59 inclusive). Applied only together with `from_date`.",
                                    "disabled": true
                                },
                                {
                                    "key": "sort_by",
                                    "value": "",
                                    "description": "Sort field; default is transaction date, newest first.",
                                    "disabled": true
                                },
                                {
                                    "key": "sort_type",
                                    "value": "",
                                    "description": "Sort direction. Default `desc`.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number, default 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "10",
                                    "description": "Rows per page, default 10.",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Paginated list of the merchant's transactions, newest first by default."
                    },
                    "response": []
                },
                {
                    "name": "Create many transactions in one call",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/v2/transaction/bulk/request",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v2",
                                "transaction",
                                "bulk",
                                "request"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Body is a JSON **array** of transaction requests. The call is\nall-or-nothing: every row is validated first (customer number, product,\ninquiry, additional params, duplicate `reference_id` within the call);\nif any row fails nothing is created. The total price of all rows must\nnot exceed the wallet balance.\n\nResponse items have no `merchant_currency` or `amount_merchant`; the\n`amount` field is the amount charged. Final statuses arrive by callback.\n",
                        "body": {
                            "mode": "raw",
                            "raw": "[\n    {\n        \"product_id\": 30971,\n        \"customer_number\": \"085207337683\",\n        \"reference_id\": \"BULK0001\"\n    },\n    {\n        \"product_id\": 30971,\n        \"customer_number\": \"085207337684\",\n        \"reference_id\": \"BULK0002\"\n    }\n]",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                }
            ]
        }
    ],
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://staging.be.airtime.mobi",
            "description": "Staging: https://staging.be.airtime.mobi | Production: https://be.airtime.mobi"
        },
        {
            "key": "apiKey",
            "value": "",
            "description": "Your merchant API key. Use a development key on staging, a production key on production."
        }
    ],
    "auth": {
        "type": "apikey",
        "apikey": [
            {
                "key": "key",
                "value": "x-api-key",
                "type": "string"
            },
            {
                "key": "value",
                "value": "{{apiKey}}",
                "type": "string"
            },
            {
                "key": "in",
                "value": "header",
                "type": "string"
            }
        ]
    }
}