catalogs detail
Endpoint
GET https://{{host}}/api/v1/catalogs/:product_type/:product_code
Available Request Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | 51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a |
Available Request Query Params
| Name | Value | Type |
|---|---|---|
| product_code | null | query |
| product_type | game-voucher | path |
| product_code | MOBILE_LEGEND | 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_code | null | query |
| product_type | game-voucher | path |
| product_code | MOBILE_LEGEND | path |
Body
No body defined.
Sample Response
{
"data": {
"description": "",
"id": 3365,
"instruction": "",
"product_code": "MOBILE_LEGEND",
"title": "Mobile Legends: Bang Bang",
"type": "Top Up",
"user_input": {
"fields": [
{
"attrs": {
"input_tag": "input",
"name": "userId",
"placeholder": "Masukkan User ID",
"type": "number"
},
"tag": "input"
},
{
"attrs": {
"input_tag": "input",
"name": "zoneId",
"placeholder": "Masukkan Zone ID",
"type": "number"
},
"tag": "input"
}
]
}
},
"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_code | null | query |
| product_type | game-voucher | path |
| product_code | MOBILE_LEGEND_FAIL | path |
Body
No body defined.
Sample Response
{
"data": null,
"status_code": "404",
"status_message": "Product not found",
"error": "product not found"
}
Documentation
Retrieve detailed metadata for a single game voucher product. The response returns core descriptive fields and a dynamic user_input specification describing required end‑user inputs (for example userId, zoneId). Use this to build your frontend form before invoking Payment.
Endpoint
GET /api/v1/catalogs/game-voucher/:product_code
Headers
| Header | Required | Description |
|---|---|---|
| x-api-key | Yes | Client API key issued by Snapcart |
Path Parameters
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| product_code | string | 1–64 | Yes | Must match a product_code from the catalog list |
Query Parameters
(None)
Request Body
(None)
Sample Response (Detail — MOBILE_LEGEND)
{
"data": {
"description": "",
"id": 3365,
"instruction": "",
"product_code": "MOBILE_LEGEND",
"title": "Mobile Legends: Bang Bang",
"type": "Top Up",
"user_input": {
"fields": [
{
"attrs": {
"input_tag": "input",
"name": "userId",
"placeholder": "Masukkan User ID",
"type": "number"
},
"tag": "input"
},
{
"attrs": {
"input_tag": "input",
"name": "zoneId",
"placeholder": "Masukkan Zone ID",
"type": "number"
},
"tag": "input"
}
]
}
},
"status_code": "200",
"status_message": "Transaction successful"
}
Sample Response (Detail — PUBGMID)
{
"data": {
"banner": "https://storage.googleapis.com/finpay-game-assets/0ce394a3-46c9-4474-b809-6b1d02e2147a-banner.jpg",
"code": "PUBG",
"description":"\\<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"379\\\" style=\\\"border-collapse: collapse;width:284pt\\\"\\>\\<tbody\\>\\<tr height=\\\"387\\\" style=\\\"height:290.0pt\\\"\\> \\<td height=\\\"387\\\" class=\\\"xl65\\\" width=\\\"379\\\" style=\\\"height:290.0pt;width:284pt\\\"\\>PUBG Mobile adalah game mobile yang memiliki 100 pemain berparasut ke pulau terpencil sejauh 8x8 km untuk pertarungan battle royal. Pemain harus menemukan dan mencari senjata, kendaraan, dan persediaan mereka sendiri, dan mengalahkan setiap pemain di medan pertempuran yang apik secara grafis dan taktik yang memaksa pemain ke zona bermain yang menyusut. Bersiaplah untuk mendarat, menjarah, dan melakukan apa pun untuk bertahan dan menjadi orang terakhir yang bertahan!\\<br\\> PUBG INDONESIA\\<br\\> Cara order :\\<br\\> \\<br\\> Masukkan ID :\\<br\\> 1. Pilih nominal UC\\<br\\> 2. Pilih metode pembayaran\\<br\\> 3. Masukkan nomor Whatsapp dengan benar!\\<br\\> 4. Klik beli sekarang dan lakukan pembayaran\\<br\\> UC akan masuk otomatis ke akun anda\\<br\\> \\<br\\> Top up UC hanya dalam hitungan detik!\\</td\\>\\</tr\\>\\</tbody\\>\\</table\\>",
"id": 3309,
"instruction": "",
"logo": "https://storage.googleapis.com/finpay-game-assets/742dfa91-34d9-45b5-b99f-7497345161ce-logo.jpg",
"product_code": "PUBGMID",
"title": "PUBG Mobile Indonesia",
"type": "Top Up",
"user_input": {
"fields": [
{
"attrs": {
"input_tag": "input",
"name": "userId",
"placeholder": "Masukkan User ID",
"type": "tel"
},
"tag": "input"
}
]
}
},
"status_code": "200",
"status_message": "Transaction successful"
}
Field Definitions (data)
| Field | Type | Description |
|---|---|---|
| id | number | Internal catalog identifier |
| product_code | string | Unique product code used in Payment |
| title | string | Human-friendly game/product title |
| type | string | Category/type label (for example "Top Up") |
| description | string | Product description; may be empty or HTML-like escaped content |
| instruction | string | Additional instructions; may be empty |
| banner | string | Full URL for banner image (if present) |
| logo | string | Full URL for logo image (if present) |
| code | string | Short internal code (may differ from product_code) |
| user_input | object | Dynamic form specification for required end‑user fields |
user_input.fields
Array describing the UI components to collect before calling Payment.
| Field | Type | Description |
|---|---|---|
| tag | string | High-level component identifier (e.g. "input") |
| attrs | object | Attributes to render the component |
user_input.fields.attrs
| Field | Type | Description |
|---|---|---|
| input_tag | string | HTML-like element (e.g., "input") |
| name | string | Field name to submit in Payment body (e.g., userId) |
| placeholder | string | Placeholder text for frontend input |
| type | string | Input type hint (e.g., "number", "tel", "text") |
Response Variability (Important)
Different game voucher product_code values can return different shapes:
- Some products include branding fields (banner, logo, code); others omit them.
- user_input fields vary:
- Example MOBILE_LEGEND requires userId + zoneId.
- Example PUBGMID only requires userId (type "tel").
- Future products may introduce additional fields (e.g. serverId, characterName) or change input_tag (select, textarea).
- description may contain escaped HTML snippets (tables, line breaks) or be a plain empty string.
- instruction may be populated for products that need extra user guidance.
- Additional enrichment fields can appear later without breaking contract; clients must ignore unknown keys safely.
- Never assume one product’s user_input field list applies to another; always render dynamically from the payload.
Best practice:
- Detect presence of user_input.fields and iterate to build form components.
- Sanitize / safely render description if you choose to convert escaped HTML to DOM.
- Fallback gracefully when optional fields (banner, logo, instruction) are missing.
- Treat code vs product_code: use product_code for Payment; code is display or vendor alias.
Error Examples
Product Not Found:
{
"status_code": "404",
"status_message": "Product not found",
"error": "Inactive or invalid product_code"
}
Unauthorized:
{
"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
- Response currently does NOT include pricing variants; pricing may be static or resolved at Payment.
- Additional fields may be added in future (forward-compatible); ignore unknown keys.
- user_input design allows future addition of new field types (select, textarea).
- Always validate and sanitize userId / zoneId before sending to Payment.
Next Step After Detail
- Render required input fields from user_input.fields.
- Collect values (e.g., userId, zoneId if present).
- Proceed to Payment:
- Body must include at least product_code plus collected user input fields.
- After Payment: poll Payment Status or await callback for the final result.