Skip to main content

catalogs

Endpoint

GET https://{{host}}/api/v1/catalogs/:product_type

Available Request Headers

KeyValue
Content-Typeapplication/json
x-api-key51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a

Available Request Query Params

NameValueType
product_typegame-voucherpath

Available Request Body

No body defined.


Sample Request and Response

success

Sample Request

Headers
KeyValue
Content-Typeapplication/json
x-api-key51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a
Params
NameValueType
product_typegame-voucherpath
Body

No body defined.

Sample Response

{
"data": [
{
"product_code": "honkai_impact_3",
"title": "Honkai-impact-3",
"product_type": "3"
},
{
"product_code": "MOBILE_LEGEND",
"title": "MOBILE_LEGEND",
"product_type": "3"
},
{
"product_code": "PUBGMID",
"title": "PUBG-Mobile-Indonesia",
"product_type": "3"
},
{
"product_code": "Valorant",
"title": "Valorant",
"product_type": "3"
}
],
"status_code": "200",
"status_message": "Transaction successful"
}

error

Sample Request

Headers
KeyValue
Content-Typeapplication/json
x-api-key51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a
Params
NameValueType
product_typegame-voucher-failpath
Body

No body defined.

Sample Response

{
"data": null,
"status_code": "400",
"error": "Invalid Product Type. Allowed values: 'pulsa', 'paket-data', 'game-voucher', 'bpjs'"
}

Documentation

Retrieve available game voucher products (catalog list) and their detailed variants (detail & items). Use these endpoints to render selectable products before Payment. All responses follow the unified envelope (status_code, status_message, data).

Endpoint (List)

GET /api/v1/catalogs/game-voucher

Headers

HeaderRequiredDescription
x-api-keyYesClient API key issued by Snapcart

Path Parameters

NameTypeRequiredDescription
product_typestringYesMust be "game-voucher" to filter game voucher catalogs.

Query Parameters

(None)

Request Body

(None)


Sample Response

{
"data": [
{
"product_code": "honkai_impact_3",
"title": "Honkai-impact-3",
"product_type": "3"
},
{
"product_code": "MOBILE_LEGEND",
"title": "MOBILE_LEGEND",
"product_type": "3"
},
{
"product_code": "PUBGMID",
"title": "PUBG-Mobile-Indonesia",
"product_type": "3"
},
{
"product_code": "Valorant",
"title": "Valorant",
"product_type": "3"
}
],
"status_code": "200",
"status_message": "Transaction successful"
}

Field Definitions (List Items)

FieldTypeDescription
product_codestringUnique product identifier used later in Payment or (if required) Inquiry.
titlestringDisplay-friendly (original) title of the game/product.
product_typestringInternal product type code (e.g. "3" denotes Game Voucher).

Notes:

  • product_type is a string in the current response (not an integer); treat it as an opaque classification.
  • No pagination metadata is returned in this version; if needed, implement client-side limiting or await future version with paging.
  • Additional descriptive fields (e.g. category, min_price, max_price) are not present here; rely on product_code for subsequent operations.

Error Examples

Product Not Found:

{
"status_code": "404",
"status_message": "Product not found",
"error": "Inactive or invalid product_code"
}

Unauthorized (missing / invalid API key):

{
"status_code": "401",
"status_message": "Unauthorized",
"error": "API key not found in request"
}

Rate Limited:

{
"status_code": "429",
"status_message": "Too many requests, please try again later",
"error": "Rate limit exceeded"
}

Notes

  • Always persist product_code chosen by the user; it is required for Payment.
  • additional_info may appear in future versions; design clients to ignore unknown fields (forward compatible).
  • Unified envelope fields: status_code / status_message (see Appendix for full mapping).

Next Step After Catalog Retrieval

  1. Present list of games to end-user.
  2. Capture product_code (and optionally variant detail if a separate detail endpoint is used).
  3. Proceed directly to Payment (one-step) or to Inquiry if the specific product enforces a preliminary validation (refer to Introduction Transaction Overview).
  4. Poll Payment Status or await callback after Payment.