AfroPin Developers
Postman Sign in Get test keys

Products you accept

List the PIN products your account can redeem, with their value limits, redemption rules and your fee.

GET https://afropin.com/api/v1/brand/catalog

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

With an SDK
PHP$afropin->brand->catalog->list($params)
Node.jsafropin.brand.catalog.list(params)
Pythonafropin.brand.catalog.list(params)
Javaafropin.brand().catalog().list(params)

Query parameters

page integer | "all" Optional

Page to return, starting at 1. Pass all to return every product without pagination; the response then has no paging.

limit integer Optional

Products per page. Defaults to 20. Ignored when page=all.

Only active products assigned to your account are returned. The same products apply to test and live keys. Paginated responses carry a paging object with page, pages, per_page, total, next and previous.

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
        }
    ],
    "paging": {
        "page": 1,
        "pages": 1,
        "per_page": 20,
        "total": 1,
        "next": null,
        "previous": null
    }
}

Errors

Failed requests return a stable code with a translated message. Branch on code, never on the message.

{
    "ok": false,
    "error": {
        "code": "invalid_api_key",
        "message": "This API key is unknown, revoked or expired, or live access is not switched on",
        "fields": null
    }
}
All error codes →