Skip to main content

catalogs detail

Endpoint

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

Available Request Headers

KeyValue
Content-Typeapplication/json
x-api-key51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a

Available Request Query Params

NameValueType
product_codenullquery
product_typegame-voucherpath
product_codeMOBILE_LEGENDpath

Available Request Body

No body defined.


Sample Request and Response

success

Sample Request

Headers
KeyValue
Content-Typeapplication/json
x-api-key51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a
Params
NameValueType
product_codenullquery
product_typegame-voucherpath
product_codeMOBILE_LEGENDpath
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
KeyValue
Content-Typeapplication/json
x-api-key51f4b8ad3a4c9f0859253700436f0a343d05602761c306c4cb514215fdf33c5a
Params
NameValueType
product_codenullquery
product_typegame-voucherpath
product_codeMOBILE_LEGEND_FAILpath
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

HeaderRequiredDescription
x-api-keyYesClient API key issued by Snapcart

Path Parameters

NameTypeLengthRequiredDescription
product_codestring1–64YesMust 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)

FieldTypeDescription
idnumberInternal catalog identifier
product_codestringUnique product code used in Payment
titlestringHuman-friendly game/product title
typestringCategory/type label (for example "Top Up")
descriptionstringProduct description; may be empty or HTML-like escaped content
instructionstringAdditional instructions; may be empty
bannerstringFull URL for banner image (if present)
logostringFull URL for logo image (if present)
codestringShort internal code (may differ from product_code)
user_inputobjectDynamic form specification for required end‑user fields

user_input.fields

Array describing the UI components to collect before calling Payment.

FieldTypeDescription
tagstringHigh-level component identifier (e.g. "input")
attrsobjectAttributes to render the component

user_input.fields.attrs

FieldTypeDescription
input_tagstringHTML-like element (e.g., "input")
namestringField name to submit in Payment body (e.g., userId)
placeholderstringPlaceholder text for frontend input
typestringInput 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:

  1. Detect presence of user_input.fields and iterate to build form components.
  2. Sanitize / safely render description if you choose to convert escaped HTML to DOM.
  3. Fallback gracefully when optional fields (banner, logo, instruction) are missing.
  4. 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

  1. Render required input fields from user_input.fields.
  2. Collect values (e.g., userId, zoneId if present).
  3. Proceed to Payment:
    • Body must include at least product_code plus collected user input fields.
  4. After Payment: poll Payment Status or await callback for the final result.