{
  "openapi": "3.1.0",
  "info": {
    "title": "IDSL API",
    "version": "2.0.0",
    "description": "IDSL (Irongate Digital Solutions) payment API — prepaid top-up and postpaid biller aggregator.\n\nThe document covers the **whole prepaid v2 surface** (balance, catalogues, inquiries, top-up, status, receipt, eSIM) plus the postpaid bill-check operation. v1 legacy endpoints are documented in the guide but intentionally absent here — new integrations use v2.\n\n**Authentication**: every request must include a `sign` field computed as md5 concatenation of your username, API key, and a command-specific value. See each operation's request schema. API keys are obtained from the IDSL developer portal (https://dvlp.irongatedigital.com/access-key).\n\n**Response envelope**: responses are wrapped as `{\"data\": {...}, \"meta\": [...]}` (JSON) or `<mp>...</mp>` (XML). Always inspect the business response code (`rc` / `response_code`) inside `data` — HTTP 200 means the request was processed, not that the transaction succeeded.\n\n**Base URLs differ per product** — pick the server matching the product you integrate (prepaid vs postpaid, production vs development). XML request bodies are accepted when `Content-Type: application/xml` is set.\n\n## Recent changes\n\n**2026-09-28**\n- **Updated** the published OpenAPI document to the **3.1** dialect (JSON Schema 2020-12). Endpoints, operations and examples are unchanged — only the format version of the document moved, so check that the tool you generate clients with supports 3.1 before upgrading.",
    "contact": {
      "email": "techsupport@irongatedigital.com"
    },
    "license": {
      "name": "Proprietary — IDSL terms of service apply"
    }
  },
  "servers": [
    {
      "url": "https://prepaid.iak.id",
      "description": "Prepaid — Production"
    },
    {
      "url": "https://api-sandbox.irongatedigital.com",
      "description": "Prepaid — Development (sandbox)"
    },
    {
      "url": "https://mobilepulsa.net",
      "description": "Postpaid — Production"
    },
    {
      "url": "https://testpostpaid.mobilepulsa.net",
      "description": "Postpaid — Development (sandbox)"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Prepaid",
      "description": "Prepaid core API (version 2) — the surface new integrations should use"
    },
    {
      "name": "Balance",
      "description": "Your own wallet"
    },
    {
      "name": "Catalogue",
      "description": "Product and code listings"
    },
    {
      "name": "Inquiry",
      "description": "Check a destination before you transact"
    },
    {
      "name": "Transaction",
      "description": "Money-moving calls"
    },
    {
      "name": "eSIM",
      "description": "eSIM-specific operations"
    },
    {
      "name": "Receipt",
      "description": "Receipt download"
    },
    {
      "name": "Postpaid",
      "description": "Postpaid biller API"
    }
  ],
  "paths": {
    "/api/check-balance": {
      "post": {
        "tags": [
          "Prepaid",
          "Balance"
        ],
        "summary": "Check Balance",
        "description": "Current reseller balance. Signature: `md5(username + api_key + 'bl')`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "checkBalance",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "sign"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+'bl')"
                  }
                }
              },
              "example": {
                "username": "123123123",
                "sign": "md5(username+api_key+'bl')"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "balance": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "balance",
                        "message",
                        "rc",
                        "currency"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "balance": 967320,
                    "message": "SUCCESS",
                    "rc": "00",
                    "currency": "IDR"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/check-game-id": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Check Game ID",
        "description": "Validate a game account id before top-up (IDSL-only endpoint). Signature: `md5(username + api_key + game_code)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "checkGameID",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "sign",
                  "game_code",
                  "game_id",
                  "game_server"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+game_code)"
                  },
                  "game_code": {
                    "type": "string",
                    "description": "Game code from the game list"
                  },
                  "game_id": {
                    "type": "string",
                    "description": "Documented request field: game_id"
                  },
                  "game_server": {
                    "type": "string",
                    "description": "Documented request field: game_server"
                  }
                }
              },
              "example": {
                "username": "123123123",
                "sign": "md5(username+api_key+game_code)",
                "game_code": "mlbb",
                "game_id": "12345678",
                "game_server": "7217"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "region": {
                          "type": "string"
                        },
                        "game_id": {
                          "type": "string"
                        },
                        "game_server": {
                          "type": "string"
                        },
                        "game_account_name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "region",
                        "game_id",
                        "game_server",
                        "game_account_name",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "region": "ID",
                    "game_id": "12345678",
                    "game_server": "7217",
                    "game_account_name": "ValidPlayer",
                    "status": 1,
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/check-number": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Check Number",
        "description": "Check a prepaid number's operator and subscriber status (IDSL-only endpoint). Signature: `md5(username + api_key + cnp)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "checkNumber",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "sign",
                  "customer_id",
                  "operator"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+cnp)"
                  },
                  "customer_id": {
                    "type": "string",
                    "description": "Destination: MSISDN, PLN meter number, game id, … depending on the product"
                  },
                  "operator": {
                    "type": "string",
                    "description": "Operator code (see the eSIM list)"
                  }
                }
              },
              "example": {
                "username": "123123123",
                "sign": "md5(username+api_key+cnp)",
                "customer_id": "081200000001",
                "operator": "telkomsel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "customer_id": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string"
                        },
                        "is_subscriber": {
                          "type": "boolean"
                        },
                        "cust_type": {
                          "type": "string"
                        },
                        "product": {
                          "type": "string"
                        },
                        "has_package": {
                          "type": "boolean"
                        },
                        "package_count": {
                          "type": "integer"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "cached": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "customer_id",
                        "operator",
                        "is_subscriber",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "customer_id": "081200000001",
                    "operator": "telkomsel",
                    "is_subscriber": true,
                    "cust_type": "PREPAID",
                    "product": "SIMPATI",
                    "has_package": true,
                    "package_count": 2,
                    "retryable": false,
                    "cached": false,
                    "status": 1,
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/check-number-packages": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Check Number Packages",
        "description": "List the packages a prepaid subscriber can buy (IDSL-only endpoint). Signature: `md5(username + api_key + cnp)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "checkNumberPackages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "sign",
                  "customer_id",
                  "operator",
                  "refresh"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+cnp)"
                  },
                  "customer_id": {
                    "type": "string",
                    "description": "Destination: MSISDN, PLN meter number, game id, … depending on the product"
                  },
                  "operator": {
                    "type": "string",
                    "description": "Operator code (see the eSIM list)"
                  },
                  "refresh": {
                    "type": "string",
                    "description": "Documented request field: refresh"
                  }
                }
              },
              "example": {
                "username": "123123123",
                "sign": "md5(username+api_key+cnp)",
                "customer_id": "081200000001",
                "operator": "telkomsel",
                "refresh": "false"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "customer_id": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string"
                        },
                        "is_subscriber": {
                          "type": "boolean"
                        },
                        "has_package": {
                          "type": "boolean"
                        },
                        "package_count": {
                          "type": "integer"
                        },
                        "packages": {
                          "type": "array",
                          "items": {}
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "cached": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "customer_id",
                        "operator",
                        "is_subscriber",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "customer_id": "081200000001",
                    "operator": "telkomsel",
                    "is_subscriber": true,
                    "has_package": true,
                    "package_count": 2,
                    "packages": [
                      {
                        "code": "DUMMY-TSEL-1",
                        "name": "Dummy Package 1",
                        "price": 50000,
                        "base_price": 65000,
                        "validity": "30 days",
                        "quota": "10 GB",
                        "category": "Internet"
                      },
                      {
                        "code": "DUMMY-TSEL-2",
                        "name": "Dummy Package 2",
                        "price": 15000,
                        "base_price": null,
                        "validity": "7 days",
                        "quota": "3 GB",
                        "category": "Internet"
                      }
                    ],
                    "truncated": false,
                    "retryable": false,
                    "cached": false,
                    "status": 1,
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/check-operator": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Check Operator",
        "description": "Detect the operator (prefix group) of a mobile number. Signature: `md5(username + api_key + 'op')`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "checkOperator",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer_id",
                  "username",
                  "sign"
                ],
                "properties": {
                  "customer_id": {
                    "type": "string",
                    "description": "Destination: MSISDN, PLN meter number, game id, … depending on the product"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+'op')"
                  }
                }
              },
              "example": {
                "customer_id": "08123456789",
                "username": "123123123",
                "sign": "md5(username+api_key+'op')"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "operator": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "operator",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "operator": "telkomsel",
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/check-status": {
      "post": {
        "tags": [
          "Prepaid",
          "Transaction"
        ],
        "summary": "Check Status",
        "description": "Transaction status by `ref_id`. Signature: `md5(username + api_key + ref_id)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "checkStatus",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ref_id",
                  "username",
                  "sign"
                ],
                "properties": {
                  "ref_id": {
                    "type": "string",
                    "description": "Your own order number — it must be unique per transaction"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+ref_id)"
                  }
                }
              },
              "example": {
                "ref_id": "unique-ref-1",
                "username": "123123123",
                "sign": "md5(username+api_key+ref_id)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status. This sample is the sandbox's own answer (`rc 39`): it cannot complete one of these orders, so the envelope is right and the code is 39.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ref_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "integer"
                        },
                        "product_code": {
                          "type": "string"
                        },
                        "customer_id": {
                          "type": "string"
                        },
                        "price": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "balance": {
                          "type": "integer"
                        },
                        "tr_id": {
                          "type": "integer"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ref_id",
                        "status",
                        "product_code",
                        "customer_id",
                        "price",
                        "message",
                        "balance",
                        "tr_id",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "ref_id": "unique-ref-1",
                    "status": 0,
                    "product_code": "htelkomsel10000",
                    "customer_id": "0822188989892",
                    "price": 11500,
                    "message": "PROCESS",
                    "balance": 967320,
                    "tr_id": 19,
                    "rc": "39"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/download/{tr_id}/{raw}": {
      "get": {
        "tags": [
          "Prepaid",
          "Receipt"
        ],
        "summary": "Download Receipt",
        "description": "Download the receipt of an IDSL prepaid transaction as raw JSON or XML (`Content-Type` decides the format). No signature required.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "downloadReceipt",
        "parameters": [
          {
            "name": "tr_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transaction id"
          },
          {
            "name": "raw",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "1 = raw receipt format"
          }
        ],
        "responses": {
          "200": {
            "description": "Raw receipt body — the `Content-Type` decides the format (JSON or XML). No signature required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "data": {
                    "tr_id": 123,
                    "date": "2024-01-01 00:01:01",
                    "name": "indobest",
                    "customer_id": "123123123",
                    "product_code": "htelkomsel5000",
                    "admin_fee": 0,
                    "price": 5500,
                    "sn": "123456789",
                    "ref_id": "order001",
                    "rc": "00",
                    "message": "SUCCESS",
                    "status": 1
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No receipt for that transaction id."
          }
        }
      }
    },
    "/api/esim/notification/activation": {
      "post": {
        "tags": [
          "Prepaid",
          "eSIM"
        ],
        "summary": "eSIM Send Activation Email",
        "description": "Send (re-send) the eSIM activation email for a transaction. Signature: `md5(username + api_key + tr_id)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "eSIMSendActivationEmail",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tr_id",
                  "email",
                  "username",
                  "sign"
                ],
                "properties": {
                  "tr_id": {
                    "type": "string",
                    "description": "Documented request field: tr_id"
                  },
                  "email": {
                    "type": "string",
                    "description": "Documented request field: email"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+tr_id)"
                  }
                }
              },
              "example": {
                "tr_id": "9916987",
                "email": "test@gmail.com",
                "username": "123123123",
                "sign": "md5(username+api_key+tr_id)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Business payload — always read `rc` / `response_code` inside it."
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/esiminternationallist/{type}": {
      "post": {
        "tags": [
          "Prepaid",
          "Catalogue"
        ],
        "summary": "eSIM International List",
        "description": "eSIM product list for international destinations. Signature: `md5(username + api_key + 'esim-inter')`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "eSIMInternationalList",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Optional type filter; leave empty for the full list"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lang",
                  "username",
                  "sign"
                ],
                "properties": {
                  "lang": {
                    "type": "string",
                    "description": "Documented request field: lang"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+'esim-inter')"
                  }
                }
              },
              "example": {
                "lang": "id",
                "username": "123123123",
                "sign": "md5(username+api_key+'esim-inter')"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {}
                        },
                        "rc": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "status": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "list",
                        "rc",
                        "message",
                        "status"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "list": [],
                    "rc": "00",
                    "message": "SUCCESS",
                    "status": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/esimlist/{operator}": {
      "post": {
        "tags": [
          "Prepaid",
          "Catalogue"
        ],
        "summary": "eSIM Indonesia List",
        "description": "eSIM product list for an Indonesian operator. Signature: `md5(username + api_key + 'esim')`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "eSIMIndonesiaList",
        "parameters": [
          {
            "name": "operator",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Operator name (lowercase), e.g. indosat"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "sign"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+'esim')"
                  }
                }
              },
              "example": {
                "username": "123123123",
                "sign": "md5(username+api_key+'esim')"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "esimlist": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "rc": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "esimlist",
                        "rc",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "esimlist": [
                      {
                        "number": "0816123456789"
                      },
                      {
                        "number": "0816626262152"
                      },
                      {
                        "number": "0816626262164"
                      }
                    ],
                    "rc": "00",
                    "message": "SUCCESS"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/game/format": {
      "post": {
        "tags": [
          "Prepaid",
          "Catalogue"
        ],
        "summary": "Game Format",
        "description": "Required fields (and their format) for a game code before an inquiry/top-up. Signature: `md5(username + api_key + game_code)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "gameFormat",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "game_code",
                  "username",
                  "sign"
                ],
                "properties": {
                  "game_code": {
                    "type": "string",
                    "description": "Game code from the game list"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+game_code)"
                  }
                }
              },
              "example": {
                "game_code": "103",
                "username": "123123123",
                "sign": "md5(username+api_key+game_code)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "formatGameId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "formatGameId",
                        "status",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "formatGameId": "[userid]|[zoneid]",
                    "status": 1,
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/gamelist": {
      "post": {
        "tags": [
          "Prepaid",
          "Catalogue"
        ],
        "summary": "Game Code List",
        "description": "List of game codes and their supported denominations. Signature: `md5(username + api_key + 'gc')`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "gameCodeList",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "sign"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+'gc')"
                  }
                }
              },
              "example": {
                "username": "123123123",
                "sign": "md5(username+api_key+'gc')"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "gamelist": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "game_code": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "rc": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "game_code": {
                          "type": "string",
                          "description": "Documented as mandatory on this endpoint"
                        },
                        "name": {
                          "type": "string",
                          "description": "Documented as mandatory on this endpoint"
                        }
                      },
                      "required": [
                        "gamelist",
                        "rc",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "gamelist": [
                      {
                        "game_code": 14,
                        "name": "Gemscool"
                      },
                      {
                        "game_code": 15,
                        "name": "Zynga"
                      },
                      {
                        "game_code": 16,
                        "name": "AsiaSoft"
                      }
                    ],
                    "rc": "00",
                    "message": "SUCCESS"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/inquiry-game-server": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Inquiry Game Server",
        "description": "Game server list for a game code. Signature: `md5(username + api_key + game_code)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "inquiryGameServer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "game_code",
                  "username",
                  "sign"
                ],
                "properties": {
                  "game_code": {
                    "type": "string",
                    "description": "Game code from the game list"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+game_code)"
                  }
                }
              },
              "example": {
                "game_code": "127",
                "username": "123123123",
                "sign": "md5(username+api_key+game_code)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "servers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "status": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "servers",
                        "status",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "servers": [
                      {
                        "name": "Eternal Love",
                        "value": "90001"
                      },
                      {
                        "name": "Midnight Party",
                        "value": "90002"
                      },
                      {
                        "name": "Memory of Faith",
                        "value": "90002003"
                      }
                    ],
                    "status": 1,
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/inquiry-ovo": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Inquiry OVO",
        "description": "OVO customer inquiry (account name) before payment. Signature: `md5(username + api_key + customer_id)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "inquiryOVO",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer_id",
                  "username",
                  "sign"
                ],
                "properties": {
                  "customer_id": {
                    "type": "string",
                    "description": "Destination: MSISDN, PLN meter number, game id, … depending on the product"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+customer_id)"
                  }
                }
              },
              "example": {
                "customer_id": "08123456789",
                "username": "123123123",
                "sign": "md5(username+api_key+customer_id)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Business payload — always read `rc` / `response_code` inside it."
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/inquiry-pln": {
      "post": {
        "tags": [
          "Prepaid",
          "Inquiry"
        ],
        "summary": "Inquiry PLN",
        "description": "PLN customer inquiry. Signature: `md5(username + api_key + customer_id)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "inquiryPLN",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer_id",
                  "username",
                  "sign"
                ],
                "properties": {
                  "customer_id": {
                    "type": "string",
                    "description": "Destination: MSISDN, PLN meter number, game id, … depending on the product"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+customer_id)"
                  }
                }
              },
              "example": {
                "customer_id": "12345678901",
                "username": "123123123",
                "sign": "md5(username+api_key+customer_id)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "customer_id": {
                          "type": "string"
                        },
                        "meter_no": {
                          "type": "string"
                        },
                        "subscriber_id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "segment_power": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "customer_id",
                        "meter_no",
                        "subscriber_id",
                        "name",
                        "segment_power",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "status": "1",
                    "customer_id": "12345678901",
                    "meter_no": "548933889287",
                    "subscriber_id": "12345678901",
                    "name": "Test PLN",
                    "segment_power": "R1M /000000900",
                    "message": "SUCCESS",
                    "rc": "00"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/pricelist": {
      "post": {
        "tags": [
          "Prepaid",
          "Catalogue"
        ],
        "summary": "Price List",
        "description": "Prepaid price list. Signature: `md5(username + api_key + 'pl')`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "priceList",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status",
                  "username",
                  "sign"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "Documented request field: status"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+'pl')"
                  }
                }
              },
              "example": {
                "status": "all",
                "username": "123123123",
                "sign": "md5(username+api_key+'pl')"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "pricelist": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "product_code": {
                                "type": "string"
                              },
                              "product_description": {
                                "type": "string"
                              },
                              "product_nominal": {
                                "type": "string"
                              },
                              "product_details": {
                                "type": "string"
                              },
                              "product_price": {
                                "type": "integer"
                              },
                              "product_type": {
                                "type": "string"
                              },
                              "active_period": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "icon_url": {
                                "type": "string"
                              },
                              "product_category": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "rc": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "pricelist",
                        "message",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "pricelist": [
                      {
                        "product_code": "abreakout1580b",
                        "product_description": "Arena Breakout",
                        "product_nominal": "Arena Breakout 1.580 Bonds",
                        "product_details": "Arena Breakout 1.580 Bonds",
                        "product_price": 412500,
                        "product_type": "game",
                        "active_period": "0",
                        "status": "active",
                        "icon_url": "-",
                        "product_category": "game",
                        "currency": "IDR"
                      },
                      {
                        "product_code": "abreakout310b",
                        "product_description": "Arena Breakout",
                        "product_nominal": "Arena Breakout 310 Bonds",
                        "product_details": "Arena Breakout 310 Bonds",
                        "product_price": 82500,
                        "product_type": "game",
                        "active_period": "0",
                        "status": "active",
                        "icon_url": "-",
                        "product_category": "game",
                        "currency": "IDR"
                      },
                      {
                        "product_code": "abreakout3200b",
                        "product_description": "Arena Breakout",
                        "product_nominal": "Arena Breakout 3.200 Bonds",
                        "product_details": "Arena Breakout 3.200 Bonds",
                        "product_price": 825000,
                        "product_type": "game",
                        "active_period": "0",
                        "status": "active",
                        "icon_url": "-",
                        "product_category": "game",
                        "currency": "IDR"
                      }
                    ],
                    "rc": "00",
                    "message": "SUCCESS"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/top-up": {
      "post": {
        "tags": [
          "Prepaid",
          "Transaction"
        ],
        "summary": "Top Up",
        "description": "Prepaid top-up transaction. Signature: `md5(username + api_key + ref_id)`.\n\nAccepted codes: the 46 documented prepaid business codes (https://api.irongatedigital.com/api/prepaid/response-code).",
        "operationId": "topUp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer_id",
                  "product_code",
                  "ref_id",
                  "username",
                  "sign"
                ],
                "properties": {
                  "customer_id": {
                    "type": "string",
                    "description": "Destination: MSISDN, PLN meter number, game id, … depending on the product"
                  },
                  "product_code": {
                    "type": "string",
                    "description": "Product code from the pricelist"
                  },
                  "ref_id": {
                    "type": "string",
                    "description": "Your own order number — it must be unique per transaction"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your registered account number"
                  },
                  "sign": {
                    "type": "string",
                    "description": "md5(username+api_key+ref_id)"
                  }
                }
              },
              "example": {
                "customer_id": "0822188989892",
                "product_code": "htelkomsel10000",
                "ref_id": "unique-ref-1",
                "username": "123123123",
                "sign": "md5(username+api_key+ref_id)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed. The business result is `rc` inside `data` — one of the 46 documented prepaid codes, not the HTTP status. This sample is the sandbox's own answer (`rc 39`): it cannot complete one of these orders, so the envelope is right and the code is 39.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ref_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "integer"
                        },
                        "product_code": {
                          "type": "string"
                        },
                        "customer_id": {
                          "type": "string"
                        },
                        "price": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        },
                        "balance": {
                          "type": "integer"
                        },
                        "tr_id": {
                          "type": "integer"
                        },
                        "rc": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ref_id",
                        "status",
                        "product_code",
                        "customer_id",
                        "price",
                        "message",
                        "balance",
                        "tr_id",
                        "rc"
                      ]
                    },
                    "meta": {
                      "type": "array",
                      "items": {},
                      "description": "Product metadata, on the endpoints that carry it"
                    }
                  }
                },
                "example": {
                  "data": {
                    "ref_id": "unique-ref-1",
                    "status": 0,
                    "product_code": "htelkomsel10000",
                    "customer_id": "0822188989892",
                    "price": 11500,
                    "message": "PROCESS",
                    "balance": 967320,
                    "tr_id": 19,
                    "rc": "39"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused outright — a missing or invalid parameter. JSON bodies carry `error_details`."
          }
        }
      }
    },
    "/api/v1/bill/check": {
      "post": {
        "tags": [
          "Postpaid"
        ],
        "summary": "Postpaid bill operation (inquiry / payment / check status)",
        "description": "Single endpoint for postpaid operations — the `commands` field selects the operation:\n- `inq-pasca` — inquiry a bill (e.g. PLN postpaid, PDAM, BPJS)\n- `pay-pasca` — pay a bill after a successful inquiry (`tr_id` from inquiry)\n- `checkstatus` — check the status of a postpaid transaction\n- `pricelist-pasca` — get the postpaid pricelist (`/api/v1/bill/check/{type}`)\n\n`sign` formula depends on the command — see the docs for each product page.",
        "operationId": "billCheck",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillCheckRequest"
              },
              "examples": {
                "plnInquiry": {
                  "summary": "PLN postpaid inquiry",
                  "value": {
                    "commands": "inq-pasca",
                    "username": "123123123",
                    "code": "PLNPOSTPAID",
                    "hp": "530000000000",
                    "ref_id": "09128374655",
                    "sign": "md5(username+api_key+ref_id)"
                  }
                },
                "plnPayment": {
                  "summary": "PLN postpaid payment (after inquiry)",
                  "value": {
                    "commands": "pay-pasca",
                    "username": "123123123",
                    "tr_id": "99000008",
                    "sign": "md5(username+api_key+tr_id)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillCheckResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BillCheckRequest": {
        "type": "object",
        "required": [
          "commands",
          "username",
          "sign"
        ],
        "properties": {
          "commands": {
            "type": "string",
            "enum": [
              "inq-pasca",
              "pay-pasca",
              "checkstatus",
              "pricelist-pasca"
            ],
            "description": "Operation to run"
          },
          "username": {
            "type": "string",
            "description": "Your registered phone number"
          },
          "code": {
            "type": "string",
            "description": "Product code — required for inquiry (e.g. PLNPOSTPAID)"
          },
          "hp": {
            "type": "string",
            "description": "Customer number — required for inquiry"
          },
          "ref_id": {
            "type": "string",
            "description": "Your order number / reference ID — required for inquiry"
          },
          "tr_id": {
            "type": "integer",
            "description": "Transaction ID from inquiry — required for payment"
          },
          "sign": {
            "type": "string",
            "description": "Command-dependent md5 signature — see the docs"
          }
        }
      },
      "BillCheckResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "description": "Product-specific fields. Common: tr_id, code, hp, ref_id, response_code, message, price, selling_price, balance, desc. Always check response_code/message inside data."
          },
          "meta": {
            "type": "array",
            "items": {}
          }
        }
      }
    }
  }
}
