catalogs
Endpoint
GET https://{{host}}/api/v1/catalogs/:product_type
Available Request Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | 51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a |
Available Request Query Params
| Name | Value | Type |
|---|---|---|
| product_type | game-voucher | path |
Available Request Body
No body defined.
Sample Request and Response
success
Sample Request
Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | 51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a |
Params
| Name | Value | Type |
|---|---|---|
| product_type | game-voucher | path |
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
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | 51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a |
Params
| Name | Value | Type |
|---|---|---|
| product_type | game-voucher-fail | path |
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
| Header | Required | Description |
|---|---|---|
| x-api-key | Yes | Client API key issued by Snapcart |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_type | string | Yes | Must 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)
| Field | Type | Description |
|---|---|---|
| product_code | string | Unique product identifier used later in Payment or (if required) Inquiry. |
| title | string | Display-friendly (original) title of the game/product. |
| product_type | string | Internal product type code (e.g. "3" denotes Game Voucher). |
Notes:
product_typeis 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_codechosen 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
- Present list of games to end-user.
- Capture
product_code(and optionally variant detail if a separate detail endpoint is used). - Proceed directly to Payment (one-step) or to Inquiry if the specific product enforces a preliminary validation (refer to Introduction Transaction Overview).
- Poll Payment Status or await callback after Payment.