Look up a product
Get one of your PIN products: what it costs to issue, which amounts it accepts, and what holders can do with it.
GET
https://afropin.com/api/v1/reseller/catalog/{catalog_id}
HMAC-signed request with a unique Idempotency-Key header. Authentication
With an SDK
PHP
$afropin->reseller->catalog->get($catalogId, $params)Node.js
afropin.reseller.catalog.get(catalogId, params)Python
afropin.reseller.catalog.get(catalog_id, params)Java
afropin.reseller().catalog().get(catalogId, params)Path parameters
pin_type
uuid
Required
The product id from Products you can sell. It must be an active product on your account.
Response fields
idProduct ID. Send it as
catalog_id to issue a PIN.pin_type_idThe PIN template the product is built on. Brands accept PINs by template.
name, currencyProduct name and the ISO 4217 currency PINs are issued in.
amount_ruleany_amount: any amount from min to max. set_amounts: only the amounts in denominations.min, maxSmallest and largest balance a PIN can hold.
denominationsAllowed amounts for fixed products, or
null.durationDays a PIN stays valid after it is issued, as a string.
can_top_upWhether PINs can be topped up.
can_spend, spend_ruleWhether PINs can be redeemed at brands, and how:
partial (spend in parts) or whole (the whole balance at once).new_code_after_top_upWhen true, every top-up replaces the PIN code with a new one; the old code stops working.
new_code_after_spendNot used on your account.
sale_commission_percentPercentage of each issue or top-up amount credited to your commission balance.
cashout_fee_percentNot used on your account.
cashout_capsNot used on your account.
allow_keep_code, allow_daily_limitWhether a sale may send keep_code (the brand lets customers keep one code, and the product would otherwise change it) and daily_limit (the product is spent in parts).
max_quote_discountThe deepest discount, in percent, a quote can give on this product: the lowest commission a reseller earns on it (or, with none, the lowest corporate discount), so your quotes never undercut them.
logo, artworkImage URLs you can show to customers.
description, how_to_redeem, termsPlain-text copy for customers, or
null.categoriesCategory names.
Request
GET /api/v1/reseller/catalog/2c3ec3c4-b729-4d40-9a0a-80e55d683ee6
Response 200
{
"ok": true,
"data": {
"id": "2c3ec3c4-b729-4d40-9a0a-80e55d683ee6",
"pin_type_id": "7a1d5e93-0c4b-4f62-9e18-3b2a6c9d4f05",
"name": "Everyday Shopping PIN",
"currency": "NGN",
"min": 1000,
"max": 50000,
"amount_rule": "set_amounts",
"denominations": [
1000,
5000,
10000,
50000
],
"logo": "https://example.com/storage/logo.png",
"artwork": "https://example.com/storage/card.png",
"description": "Spend at any participating store.",
"how_to_redeem": "Show the PIN at checkout.",
"terms": "Valid for 365 days from issue.",
"categories": [
"Groceries"
],
"duration": "365",
"can_top_up": true,
"can_spend": true,
"spend_rule": "partial",
"new_code_after_top_up": false,
"new_code_after_spend": true,
"sale_commission_percent": 2.5,
"cashout_fee_percent": 3,
"cashout_caps": {
"per_day": 100000,
"per_week": 300000,
"per_month": 1000000
}
}
}
Errors
Failed requests return a stable code with a translated message. Branch on code, never on the message.
404
catalog_item_not_found
No item in your catalog has this catalog_id
{
"ok": false,
"error": {
"code": "catalog_item_not_found",
"message": "No item in your catalog has this catalog_id",
"fields": null
}
}
All error codes →