Freeze a PIN
Freeze a PIN, for example when a customer reports it lost. A disabled PIN cannot be redeemed or topped up until you activate it again.
POST
https://afropin.com/api/v1/brand/pins/block
HMAC-signed request with a unique Idempotency-Key header. Authentication
With an SDK
PHP
$afropin->brand->pins->block($params)Node.js
afropin.brand.pins.block(params)Python
afropin.brand.pins.block(params)Java
afropin.brand().pins().block(params)Body parameters
pin_id
uuid
Required
The PIN pin_id. It must belong to your account and to the mode of your API key.
Customer lost their code? Instead of disabling the PIN, give it a new code with Reissue a PIN code: the old code stops working and the balance is kept.
The balance stays on the PIN. Re-activate it with Activate a PIN. Expired PINs cannot be disabled.
Request
{
"pin_id": "e83f72e0-997c-4ca8-aee8-04a7423a1bd4"
}
Response 200
{
"ok": true,
"data": null
}
Errors
Failed requests return a stable code with a translated message. Branch on code, never on the message.
422
validation_error
Some fields are missing or invalid
403
wrong_account_type
Your account type cannot use this endpoint
429
rate_limited
Too many requests. Wait a moment and try again
404
pin_not_found
No PIN has this id
403
pin_expired
This PIN has expired
409
pin_already_blocked
This PIN is already blocked
500
internal_error
Something went wrong on our side. Try again; if it keeps happening, contact support
{
"ok": false,
"error": {
"code": "pin_not_found",
"message": "No PIN has this id",
"fields": null
}
}
All error codes →