Pin Api Provider

### `vtupress_pin_api_providers`

Add new API routing provider definitions for Exam/Recharge Card Pins. This does not add a new network, but rather a new _API Provider_ (like VTPass or EPins) that developers can route traffic to.

**Before:** `[‘vtpass’ => [‘name’ => ‘VTPass API’, ‘pin_type’ => ‘recharge_card’, ‘countries’ => [‘nigeria’], ‘default_networks’ => [‘mtn’ => ‘1’]]]`

**Hook Example:**

```php

add_filter('vtupress_pin_api_providers', function($providers) {

    $providers['my_custom_api'] = [

        'name' => 'My Custom Educational API',

        'pin_type' => 'education', // Can be 'education' or 'recharge_card'

        'countries' => ['nigeria'],

        'default_networks' => [

            'waec' => 'exam_code_1',

            'neco' => 'exam_code_2'

        ]

    ];

    return $providers;

});

```

**After:** New API provider schema is added and becomes available in the Admin routing dropdowns for Exam Pins.

Was this page helpful?