AfroPin Developers
Postman Sign in Get test keys

What you accept

Look up a product

Return one PIN product assigned to your account.

GET https://afropin.com/api/v1/brand/catalog/{catalog_id}

HMAC-signed request with a unique Idempotency-Key header. Authentication

With an SDK
PHP$afropin->brand->catalog->get($catalogId, $params)
Node.jsafropin.brand.catalog.get(catalogId, params)
Pythonafropin.brand.catalog.get(catalog_id, params)
Javaafropin.brand().catalog().get(catalogId, params)

Path parameters

pin_type uuid Required

The product id from Products you can sell.

A product that is inactive or not assigned to your account returns catalog_item_not_found.

Product object

id uuid Required

Product ID. Use it with Look up a product.

pin_type_id uuid Required

The PIN template this product is built on.

name string Required

Product name shown to customers.

currency string Required

ISO 4217 currency of PINs for this product.

min number Required

Smallest PIN value.

max number Required

Largest PIN value.

amount_rule string Required set_amounts any_amount

set_amounts PINs come only in the values in denominations; any_amount PINs can hold any value between min and max.

denominations array Required

Fixed values offered. Empty for range products.

logo string | null Required

URL of the brand logo.

artwork string | null Required

URL of the card image.

description string | null Required

Product description, with HTML removed.

terms string | null Required

Terms of use, with HTML removed.

categories string[] Required

Category names the product belongs to.

duration string Required

How long a PIN is valid for, in days.

can_top_up boolean Required

Whether resellers can add value to an issued PIN.

can_spend boolean Required

Whether PINs of this product can be redeemed.

spend_rule string Required whole partial

whole: a redemption must use the full remaining balance. partial: any amount up to the balance.

new_code_after_top_up boolean Required

Whether a top-up replaces the PIN code.

new_code_after_spend boolean Required

Whether a redemption replaces the PIN code. When true, the redeem response carries the new code and the old one stops working.

redemption_fee_percent number Required

Your redemption fee, as a percentage of each redeemed amount.

Response 200

{
    "ok": true,
    "data": {
        "id": "8a3f1c6e-2b7d-4e90-b5a1-9c4d7e2f0b36",
        "pin_type_id": "e71b4c9a-3d2f-4a86-9b05-6f1e8c2d7a43",
        "name": "Afropin Shopping PIN",
        "currency": "NGN",
        "min": 5000,
        "max": 2000000,
        "amount_rule": "any_amount",
        "denominations": [],
        "logo": "https://example.com/storage/logo.png",
        "artwork": "https://example.com/storage/card.png",
        "description": "Spend at any participating store.",
        "terms": "Valid for 365 days from issue.",
        "categories": [
            "Shopping"
        ],
        "duration": "365",
        "can_top_up": true,
        "can_spend": true,
        "spend_rule": "partial",
        "new_code_after_top_up": false,
        "new_code_after_spend": true,
        "redemption_fee_percent": 1.5
    }
}

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 →